mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-199f9b66c0a2b2e4/out/
ualberta.rs

1#![doc = "MAVLink ualberta dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#[cfg(feature = "arbitrary")]
5use arbitrary::Arbitrary;
6#[allow(unused_imports)]
7use bitflags::bitflags;
8use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
9#[allow(unused_imports)]
10use num_derive::FromPrimitive;
11#[allow(unused_imports)]
12use num_derive::ToPrimitive;
13#[allow(unused_imports)]
14use num_traits::FromPrimitive;
15#[allow(unused_imports)]
16use num_traits::ToPrimitive;
17#[cfg(feature = "serde")]
18use serde::{Deserialize, Serialize};
19#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
20#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21#[cfg_attr(feature = "serde", serde(tag = "type"))]
22#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23#[repr(u32)]
24#[doc = "Available autopilot modes for ualberta uav"]
25pub enum UalbertaAutopilotMode {
26    #[doc = "Raw input pulse widts sent to output"]
27    MODE_MANUAL_DIRECT = 1,
28    #[doc = "Inputs are normalized using calibration, the converted back to raw pulse widths for output"]
29    MODE_MANUAL_SCALED = 2,
30    MODE_AUTO_PID_ATT = 3,
31    MODE_AUTO_PID_VEL = 4,
32    MODE_AUTO_PID_POS = 5,
33}
34impl UalbertaAutopilotMode {
35    pub const DEFAULT: Self = Self::MODE_MANUAL_DIRECT;
36}
37impl Default for UalbertaAutopilotMode {
38    fn default() -> Self {
39        Self::DEFAULT
40    }
41}
42#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
43#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
44#[cfg_attr(feature = "serde", serde(tag = "type"))]
45#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
46#[repr(u32)]
47pub enum MavArmAuthDeniedReason {
48    #[doc = "Not a specific reason"]
49    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
50    #[doc = "Authorizer will send the error as string to GCS"]
51    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
52    #[doc = "At least one waypoint have a invalid value"]
53    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
54    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
55    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
56    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
57    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
58    #[doc = "Weather is not good to fly"]
59    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
60}
61impl MavArmAuthDeniedReason {
62    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
63}
64impl Default for MavArmAuthDeniedReason {
65    fn default() -> Self {
66        Self::DEFAULT
67    }
68}
69#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
70#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
71#[cfg_attr(feature = "serde", serde(tag = "type"))]
72#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
73#[repr(u32)]
74#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
75pub enum CameraZoomType {
76    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
77    ZOOM_TYPE_STEP = 0,
78    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
79    ZOOM_TYPE_CONTINUOUS = 1,
80    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
81    ZOOM_TYPE_RANGE = 2,
82    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
83    ZOOM_TYPE_FOCAL_LENGTH = 3,
84    #[doc = "Zoom value as horizontal field of view in degrees."]
85    ZOOM_TYPE_HORIZONTAL_FOV = 4,
86}
87impl CameraZoomType {
88    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
89}
90impl Default for CameraZoomType {
91    fn default() -> Self {
92        Self::DEFAULT
93    }
94}
95#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
96#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
97#[cfg_attr(feature = "serde", serde(tag = "type"))]
98#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
99#[repr(u32)]
100#[doc = "Airborne status of UAS."]
101pub enum UtmFlightState {
102    #[doc = "The flight state can't be determined."]
103    UTM_FLIGHT_STATE_UNKNOWN = 1,
104    #[doc = "UAS on ground."]
105    UTM_FLIGHT_STATE_GROUND = 2,
106    #[doc = "UAS airborne."]
107    UTM_FLIGHT_STATE_AIRBORNE = 3,
108    #[doc = "UAS is in an emergency flight state."]
109    UTM_FLIGHT_STATE_EMERGENCY = 16,
110    #[doc = "UAS has no active controls."]
111    UTM_FLIGHT_STATE_NOCTRL = 32,
112}
113impl UtmFlightState {
114    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
115}
116impl Default for UtmFlightState {
117    fn default() -> Self {
118        Self::DEFAULT
119    }
120}
121#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
123#[cfg_attr(feature = "serde", serde(tag = "type"))]
124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
125#[repr(u32)]
126pub enum CanFilterOp {
127    CAN_FILTER_REPLACE = 0,
128    CAN_FILTER_ADD = 1,
129    CAN_FILTER_REMOVE = 2,
130}
131impl CanFilterOp {
132    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
133}
134impl Default for CanFilterOp {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
145pub enum MavComponent {
146    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
147    MAV_COMP_ID_ALL = 0,
148    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
149    MAV_COMP_ID_AUTOPILOT1 = 1,
150    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
151    MAV_COMP_ID_USER1 = 25,
152    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
153    MAV_COMP_ID_USER2 = 26,
154    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
155    MAV_COMP_ID_USER3 = 27,
156    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
157    MAV_COMP_ID_USER4 = 28,
158    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
159    MAV_COMP_ID_USER5 = 29,
160    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
161    MAV_COMP_ID_USER6 = 30,
162    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
163    MAV_COMP_ID_USER7 = 31,
164    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
165    MAV_COMP_ID_USER8 = 32,
166    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
167    MAV_COMP_ID_USER9 = 33,
168    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
169    MAV_COMP_ID_USER10 = 34,
170    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
171    MAV_COMP_ID_USER11 = 35,
172    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
173    MAV_COMP_ID_USER12 = 36,
174    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
175    MAV_COMP_ID_USER13 = 37,
176    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
177    MAV_COMP_ID_USER14 = 38,
178    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
179    MAV_COMP_ID_USER15 = 39,
180    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
181    MAV_COMP_ID_USER16 = 40,
182    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
183    MAV_COMP_ID_USER17 = 41,
184    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
185    MAV_COMP_ID_USER18 = 42,
186    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
187    MAV_COMP_ID_USER19 = 43,
188    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
189    MAV_COMP_ID_USER20 = 44,
190    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
191    MAV_COMP_ID_USER21 = 45,
192    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
193    MAV_COMP_ID_USER22 = 46,
194    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
195    MAV_COMP_ID_USER23 = 47,
196    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
197    MAV_COMP_ID_USER24 = 48,
198    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
199    MAV_COMP_ID_USER25 = 49,
200    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
201    MAV_COMP_ID_USER26 = 50,
202    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
203    MAV_COMP_ID_USER27 = 51,
204    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
205    MAV_COMP_ID_USER28 = 52,
206    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
207    MAV_COMP_ID_USER29 = 53,
208    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
209    MAV_COMP_ID_USER30 = 54,
210    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
211    MAV_COMP_ID_USER31 = 55,
212    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
213    MAV_COMP_ID_USER32 = 56,
214    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
215    MAV_COMP_ID_USER33 = 57,
216    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
217    MAV_COMP_ID_USER34 = 58,
218    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
219    MAV_COMP_ID_USER35 = 59,
220    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
221    MAV_COMP_ID_USER36 = 60,
222    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
223    MAV_COMP_ID_USER37 = 61,
224    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
225    MAV_COMP_ID_USER38 = 62,
226    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
227    MAV_COMP_ID_USER39 = 63,
228    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
229    MAV_COMP_ID_USER40 = 64,
230    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
231    MAV_COMP_ID_USER41 = 65,
232    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
233    MAV_COMP_ID_USER42 = 66,
234    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
235    MAV_COMP_ID_USER43 = 67,
236    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
237    MAV_COMP_ID_TELEMETRY_RADIO = 68,
238    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
239    MAV_COMP_ID_USER45 = 69,
240    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
241    MAV_COMP_ID_USER46 = 70,
242    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
243    MAV_COMP_ID_USER47 = 71,
244    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
245    MAV_COMP_ID_USER48 = 72,
246    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
247    MAV_COMP_ID_USER49 = 73,
248    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
249    MAV_COMP_ID_USER50 = 74,
250    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
251    MAV_COMP_ID_USER51 = 75,
252    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
253    MAV_COMP_ID_USER52 = 76,
254    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
255    MAV_COMP_ID_USER53 = 77,
256    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
257    MAV_COMP_ID_USER54 = 78,
258    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
259    MAV_COMP_ID_USER55 = 79,
260    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
261    MAV_COMP_ID_USER56 = 80,
262    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
263    MAV_COMP_ID_USER57 = 81,
264    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
265    MAV_COMP_ID_USER58 = 82,
266    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
267    MAV_COMP_ID_USER59 = 83,
268    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
269    MAV_COMP_ID_USER60 = 84,
270    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
271    MAV_COMP_ID_USER61 = 85,
272    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
273    MAV_COMP_ID_USER62 = 86,
274    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
275    MAV_COMP_ID_USER63 = 87,
276    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
277    MAV_COMP_ID_USER64 = 88,
278    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
279    MAV_COMP_ID_USER65 = 89,
280    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
281    MAV_COMP_ID_USER66 = 90,
282    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
283    MAV_COMP_ID_USER67 = 91,
284    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
285    MAV_COMP_ID_USER68 = 92,
286    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
287    MAV_COMP_ID_USER69 = 93,
288    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
289    MAV_COMP_ID_USER70 = 94,
290    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
291    MAV_COMP_ID_USER71 = 95,
292    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
293    MAV_COMP_ID_USER72 = 96,
294    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
295    MAV_COMP_ID_USER73 = 97,
296    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
297    MAV_COMP_ID_USER74 = 98,
298    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
299    MAV_COMP_ID_USER75 = 99,
300    #[doc = "Camera #1."]
301    MAV_COMP_ID_CAMERA = 100,
302    #[doc = "Camera #2."]
303    MAV_COMP_ID_CAMERA2 = 101,
304    #[doc = "Camera #3."]
305    MAV_COMP_ID_CAMERA3 = 102,
306    #[doc = "Camera #4."]
307    MAV_COMP_ID_CAMERA4 = 103,
308    #[doc = "Camera #5."]
309    MAV_COMP_ID_CAMERA5 = 104,
310    #[doc = "Camera #6."]
311    MAV_COMP_ID_CAMERA6 = 105,
312    #[doc = "Servo #1."]
313    MAV_COMP_ID_SERVO1 = 140,
314    #[doc = "Servo #2."]
315    MAV_COMP_ID_SERVO2 = 141,
316    #[doc = "Servo #3."]
317    MAV_COMP_ID_SERVO3 = 142,
318    #[doc = "Servo #4."]
319    MAV_COMP_ID_SERVO4 = 143,
320    #[doc = "Servo #5."]
321    MAV_COMP_ID_SERVO5 = 144,
322    #[doc = "Servo #6."]
323    MAV_COMP_ID_SERVO6 = 145,
324    #[doc = "Servo #7."]
325    MAV_COMP_ID_SERVO7 = 146,
326    #[doc = "Servo #8."]
327    MAV_COMP_ID_SERVO8 = 147,
328    #[doc = "Servo #9."]
329    MAV_COMP_ID_SERVO9 = 148,
330    #[doc = "Servo #10."]
331    MAV_COMP_ID_SERVO10 = 149,
332    #[doc = "Servo #11."]
333    MAV_COMP_ID_SERVO11 = 150,
334    #[doc = "Servo #12."]
335    MAV_COMP_ID_SERVO12 = 151,
336    #[doc = "Servo #13."]
337    MAV_COMP_ID_SERVO13 = 152,
338    #[doc = "Servo #14."]
339    MAV_COMP_ID_SERVO14 = 153,
340    #[doc = "Gimbal #1."]
341    MAV_COMP_ID_GIMBAL = 154,
342    #[doc = "Logging component."]
343    MAV_COMP_ID_LOG = 155,
344    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
345    MAV_COMP_ID_ADSB = 156,
346    #[doc = "On Screen Display (OSD) devices for video links."]
347    MAV_COMP_ID_OSD = 157,
348    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
349    MAV_COMP_ID_PERIPHERAL = 158,
350    #[doc = "Gimbal ID for QX1."]
351    MAV_COMP_ID_QX1_GIMBAL = 159,
352    #[doc = "FLARM collision alert component."]
353    MAV_COMP_ID_FLARM = 160,
354    #[doc = "Parachute component."]
355    MAV_COMP_ID_PARACHUTE = 161,
356    #[doc = "Winch component."]
357    MAV_COMP_ID_WINCH = 169,
358    #[doc = "Gimbal #2."]
359    MAV_COMP_ID_GIMBAL2 = 171,
360    #[doc = "Gimbal #3."]
361    MAV_COMP_ID_GIMBAL3 = 172,
362    #[doc = "Gimbal #4"]
363    MAV_COMP_ID_GIMBAL4 = 173,
364    #[doc = "Gimbal #5."]
365    MAV_COMP_ID_GIMBAL5 = 174,
366    #[doc = "Gimbal #6."]
367    MAV_COMP_ID_GIMBAL6 = 175,
368    #[doc = "Battery #1."]
369    MAV_COMP_ID_BATTERY = 180,
370    #[doc = "Battery #2."]
371    MAV_COMP_ID_BATTERY2 = 181,
372    #[doc = "CAN over MAVLink client."]
373    MAV_COMP_ID_MAVCAN = 189,
374    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
375    MAV_COMP_ID_MISSIONPLANNER = 190,
376    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
377    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
378    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
379    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
380    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
381    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
382    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
383    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
384    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
385    MAV_COMP_ID_PATHPLANNER = 195,
386    #[doc = "Component that plans a collision free path between two points."]
387    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
388    #[doc = "Component that provides position estimates using VIO techniques."]
389    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
390    #[doc = "Component that manages pairing of vehicle and GCS."]
391    MAV_COMP_ID_PAIRING_MANAGER = 198,
392    #[doc = "Inertial Measurement Unit (IMU) #1."]
393    MAV_COMP_ID_IMU = 200,
394    #[doc = "Inertial Measurement Unit (IMU) #2."]
395    MAV_COMP_ID_IMU_2 = 201,
396    #[doc = "Inertial Measurement Unit (IMU) #3."]
397    MAV_COMP_ID_IMU_3 = 202,
398    #[doc = "GPS #1."]
399    MAV_COMP_ID_GPS = 220,
400    #[doc = "GPS #2."]
401    MAV_COMP_ID_GPS2 = 221,
402    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
403    MAV_COMP_ID_ODID_TXRX_1 = 236,
404    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
405    MAV_COMP_ID_ODID_TXRX_2 = 237,
406    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
407    MAV_COMP_ID_ODID_TXRX_3 = 238,
408    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
409    MAV_COMP_ID_UDP_BRIDGE = 240,
410    #[doc = "Component to bridge to UART (i.e. from UDP)."]
411    MAV_COMP_ID_UART_BRIDGE = 241,
412    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
413    MAV_COMP_ID_TUNNEL_NODE = 242,
414    #[doc = "Illuminator"]
415    MAV_COMP_ID_ILLUMINATOR = 243,
416    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
417    MAV_COMP_ID_SYSTEM_CONTROL = 250,
418}
419impl MavComponent {
420    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
421}
422impl Default for MavComponent {
423    fn default() -> Self {
424        Self::DEFAULT
425    }
426}
427#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
429#[cfg_attr(feature = "serde", serde(tag = "type"))]
430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
431#[repr(u32)]
432#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
433pub enum ActuatorOutputFunction {
434    #[doc = "No function (disabled)."]
435    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
436    #[doc = "Motor 1"]
437    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
438    #[doc = "Motor 2"]
439    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
440    #[doc = "Motor 3"]
441    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
442    #[doc = "Motor 4"]
443    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
444    #[doc = "Motor 5"]
445    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
446    #[doc = "Motor 6"]
447    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
448    #[doc = "Motor 7"]
449    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
450    #[doc = "Motor 8"]
451    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
452    #[doc = "Motor 9"]
453    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
454    #[doc = "Motor 10"]
455    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
456    #[doc = "Motor 11"]
457    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
458    #[doc = "Motor 12"]
459    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
460    #[doc = "Motor 13"]
461    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
462    #[doc = "Motor 14"]
463    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
464    #[doc = "Motor 15"]
465    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
466    #[doc = "Motor 16"]
467    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
468    #[doc = "Servo 1"]
469    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
470    #[doc = "Servo 2"]
471    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
472    #[doc = "Servo 3"]
473    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
474    #[doc = "Servo 4"]
475    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
476    #[doc = "Servo 5"]
477    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
478    #[doc = "Servo 6"]
479    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
480    #[doc = "Servo 7"]
481    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
482    #[doc = "Servo 8"]
483    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
484    #[doc = "Servo 9"]
485    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
486    #[doc = "Servo 10"]
487    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
488    #[doc = "Servo 11"]
489    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
490    #[doc = "Servo 12"]
491    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
492    #[doc = "Servo 13"]
493    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
494    #[doc = "Servo 14"]
495    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
496    #[doc = "Servo 15"]
497    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
498    #[doc = "Servo 16"]
499    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
500}
501impl ActuatorOutputFunction {
502    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
503}
504impl Default for ActuatorOutputFunction {
505    fn default() -> Self {
506        Self::DEFAULT
507    }
508}
509#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
511#[cfg_attr(feature = "serde", serde(tag = "type"))]
512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
513#[repr(u32)]
514#[doc = "Enumeration of landed detector states"]
515pub enum MavLandedState {
516    #[doc = "MAV landed state is unknown"]
517    MAV_LANDED_STATE_UNDEFINED = 0,
518    #[doc = "MAV is landed (on ground)"]
519    MAV_LANDED_STATE_ON_GROUND = 1,
520    #[doc = "MAV is in air"]
521    MAV_LANDED_STATE_IN_AIR = 2,
522    #[doc = "MAV currently taking off"]
523    MAV_LANDED_STATE_TAKEOFF = 3,
524    #[doc = "MAV currently landing"]
525    MAV_LANDED_STATE_LANDING = 4,
526}
527impl MavLandedState {
528    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
529}
530impl Default for MavLandedState {
531    fn default() -> Self {
532        Self::DEFAULT
533    }
534}
535#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
537#[cfg_attr(feature = "serde", serde(tag = "type"))]
538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
539#[repr(u32)]
540#[doc = "Gripper actions."]
541pub enum GripperActions {
542    #[doc = "Gripper release cargo."]
543    GRIPPER_ACTION_RELEASE = 0,
544    #[doc = "Gripper grab onto cargo."]
545    GRIPPER_ACTION_GRAB = 1,
546}
547impl GripperActions {
548    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
549}
550impl Default for GripperActions {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
557#[cfg_attr(feature = "serde", serde(tag = "type"))]
558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
559#[repr(u32)]
560#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
561pub enum ParachuteAction {
562    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
563    PARACHUTE_DISABLE = 0,
564    #[doc = "Enable auto-release of parachute."]
565    PARACHUTE_ENABLE = 1,
566    #[doc = "Release parachute and kill motors."]
567    PARACHUTE_RELEASE = 2,
568}
569impl ParachuteAction {
570    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
571}
572impl Default for ParachuteAction {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
578impl GimbalDeviceCapFlags {
579    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
580}
581impl Default for GimbalDeviceCapFlags {
582    fn default() -> Self {
583        Self::DEFAULT
584    }
585}
586bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
587impl GpsInputIgnoreFlags {
588    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
589}
590impl Default for GpsInputIgnoreFlags {
591    fn default() -> Self {
592        Self::DEFAULT
593    }
594}
595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
597#[cfg_attr(feature = "serde", serde(tag = "type"))]
598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
599#[repr(u32)]
600#[doc = "These flags encode the cellular network status"]
601pub enum CellularStatusFlag {
602    #[doc = "State unknown or not reportable."]
603    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
604    #[doc = "Modem is unusable"]
605    CELLULAR_STATUS_FLAG_FAILED = 1,
606    #[doc = "Modem is being initialized"]
607    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
608    #[doc = "Modem is locked"]
609    CELLULAR_STATUS_FLAG_LOCKED = 3,
610    #[doc = "Modem is not enabled and is powered down"]
611    CELLULAR_STATUS_FLAG_DISABLED = 4,
612    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
613    CELLULAR_STATUS_FLAG_DISABLING = 5,
614    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
615    CELLULAR_STATUS_FLAG_ENABLING = 6,
616    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
617    CELLULAR_STATUS_FLAG_ENABLED = 7,
618    #[doc = "Modem is searching for a network provider to register"]
619    CELLULAR_STATUS_FLAG_SEARCHING = 8,
620    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
621    CELLULAR_STATUS_FLAG_REGISTERED = 9,
622    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
623    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
624    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
625    CELLULAR_STATUS_FLAG_CONNECTING = 11,
626    #[doc = "One or more packet data bearers is active and connected"]
627    CELLULAR_STATUS_FLAG_CONNECTED = 12,
628}
629impl CellularStatusFlag {
630    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
631}
632impl Default for CellularStatusFlag {
633    fn default() -> Self {
634        Self::DEFAULT
635    }
636}
637#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
639#[cfg_attr(feature = "serde", serde(tag = "type"))]
640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
641#[repr(u32)]
642#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
643pub enum MotorTestOrder {
644    #[doc = "Default autopilot motor test method."]
645    MOTOR_TEST_ORDER_DEFAULT = 0,
646    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
647    MOTOR_TEST_ORDER_SEQUENCE = 1,
648    #[doc = "Motor numbers are specified as the output as labeled on the board."]
649    MOTOR_TEST_ORDER_BOARD = 2,
650}
651impl MotorTestOrder {
652    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
653}
654impl Default for MotorTestOrder {
655    fn default() -> Self {
656        Self::DEFAULT
657    }
658}
659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
661#[cfg_attr(feature = "serde", serde(tag = "type"))]
662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
663#[repr(u32)]
664#[doc = "Enumeration for battery charge states."]
665pub enum MavBatteryChargeState {
666    #[doc = "Low battery state is not provided"]
667    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
668    #[doc = "Battery is not in low state. Normal operation."]
669    MAV_BATTERY_CHARGE_STATE_OK = 1,
670    #[doc = "Battery state is low, warn and monitor close."]
671    MAV_BATTERY_CHARGE_STATE_LOW = 2,
672    #[doc = "Battery state is critical, return or abort immediately."]
673    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
674    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
675    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
676    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
677    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
678    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
679    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
680    #[doc = "Battery is charging."]
681    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
682}
683impl MavBatteryChargeState {
684    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
685}
686impl Default for MavBatteryChargeState {
687    fn default() -> Self {
688        Self::DEFAULT
689    }
690}
691#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
693#[cfg_attr(feature = "serde", serde(tag = "type"))]
694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
695#[repr(u32)]
696pub enum MavOdidCategoryEu {
697    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
698    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
699    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
700    MAV_ODID_CATEGORY_EU_OPEN = 1,
701    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
702    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
703    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
704    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
705}
706impl MavOdidCategoryEu {
707    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
708}
709impl Default for MavOdidCategoryEu {
710    fn default() -> Self {
711        Self::DEFAULT
712    }
713}
714#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
716#[cfg_attr(feature = "serde", serde(tag = "type"))]
717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
718#[repr(u32)]
719#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
720pub enum MavDoRepositionFlags {
721    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
722    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
723}
724impl MavDoRepositionFlags {
725    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
726}
727impl Default for MavDoRepositionFlags {
728    fn default() -> Self {
729        Self::DEFAULT
730    }
731}
732#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
734#[cfg_attr(feature = "serde", serde(tag = "type"))]
735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
736#[repr(u32)]
737#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
738pub enum MavFtpOpcode {
739    #[doc = "None. Ignored, always ACKed"]
740    MAV_FTP_OPCODE_NONE = 0,
741    #[doc = "TerminateSession: Terminates open Read session"]
742    MAV_FTP_OPCODE_TERMINATESESSION = 1,
743    #[doc = "ResetSessions: Terminates all open read sessions"]
744    MAV_FTP_OPCODE_RESETSESSION = 2,
745    #[doc = "ListDirectory. List files and directories in path from offset"]
746    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
747    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
748    MAV_FTP_OPCODE_OPENFILERO = 4,
749    #[doc = "ReadFile: Reads size bytes from offset in session"]
750    MAV_FTP_OPCODE_READFILE = 5,
751    #[doc = "CreateFile: Creates file at path for writing, returns session"]
752    MAV_FTP_OPCODE_CREATEFILE = 6,
753    #[doc = "WriteFile: Writes size bytes to offset in session"]
754    MAV_FTP_OPCODE_WRITEFILE = 7,
755    #[doc = "RemoveFile: Remove file at path"]
756    MAV_FTP_OPCODE_REMOVEFILE = 8,
757    #[doc = "CreateDirectory: Creates directory at path"]
758    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
759    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
760    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
761    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
762    MAV_FTP_OPCODE_OPENFILEWO = 11,
763    #[doc = "TruncateFile: Truncate file at path to offset length"]
764    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
765    #[doc = "Rename: Rename path1 to path2"]
766    MAV_FTP_OPCODE_RENAME = 13,
767    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
768    MAV_FTP_OPCODE_CALCFILECRC = 14,
769    #[doc = "BurstReadFile: Burst download session file"]
770    MAV_FTP_OPCODE_BURSTREADFILE = 15,
771    #[doc = "ACK: ACK response"]
772    MAV_FTP_OPCODE_ACK = 128,
773    #[doc = "NAK: NAK response"]
774    MAV_FTP_OPCODE_NAK = 129,
775}
776impl MavFtpOpcode {
777    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
778}
779impl Default for MavFtpOpcode {
780    fn default() -> Self {
781        Self::DEFAULT
782    }
783}
784#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
786#[cfg_attr(feature = "serde", serde(tag = "type"))]
787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
788#[repr(u32)]
789#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
790pub enum MavSeverity {
791    #[doc = "System is unusable. This is a \"panic\" condition."]
792    MAV_SEVERITY_EMERGENCY = 0,
793    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
794    MAV_SEVERITY_ALERT = 1,
795    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
796    MAV_SEVERITY_CRITICAL = 2,
797    #[doc = "Indicates an error in secondary/redundant systems."]
798    MAV_SEVERITY_ERROR = 3,
799    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
800    MAV_SEVERITY_WARNING = 4,
801    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
802    MAV_SEVERITY_NOTICE = 5,
803    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
804    MAV_SEVERITY_INFO = 6,
805    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
806    MAV_SEVERITY_DEBUG = 7,
807}
808impl MavSeverity {
809    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
810}
811impl Default for MavSeverity {
812    fn default() -> Self {
813        Self::DEFAULT
814    }
815}
816bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
817impl AdsbFlags {
818    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
819}
820impl Default for AdsbFlags {
821    fn default() -> Self {
822        Self::DEFAULT
823    }
824}
825#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
827#[cfg_attr(feature = "serde", serde(tag = "type"))]
828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
829#[repr(u32)]
830pub enum MavOdidClassificationType {
831    #[doc = "The classification type for the UA is undeclared."]
832    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
833    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
834    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
835}
836impl MavOdidClassificationType {
837    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
838}
839impl Default for MavOdidClassificationType {
840    fn default() -> Self {
841        Self::DEFAULT
842    }
843}
844#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
846#[cfg_attr(feature = "serde", serde(tag = "type"))]
847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
848#[repr(u32)]
849#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
850pub enum CompMetadataType {
851    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
852    COMP_METADATA_TYPE_GENERAL = 0,
853    #[doc = "Parameter meta data."]
854    COMP_METADATA_TYPE_PARAMETER = 1,
855    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
856    COMP_METADATA_TYPE_COMMANDS = 2,
857    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
858    COMP_METADATA_TYPE_PERIPHERALS = 3,
859    #[doc = "Meta data for the events interface."]
860    COMP_METADATA_TYPE_EVENTS = 4,
861    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
862    COMP_METADATA_TYPE_ACTUATORS = 5,
863}
864impl CompMetadataType {
865    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
866}
867impl Default for CompMetadataType {
868    fn default() -> Self {
869        Self::DEFAULT
870    }
871}
872bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
873impl CameraTrackingTargetData {
874    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
875}
876impl Default for CameraTrackingTargetData {
877    fn default() -> Self {
878        Self::DEFAULT
879    }
880}
881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
883#[cfg_attr(feature = "serde", serde(tag = "type"))]
884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
885#[repr(u32)]
886#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
887pub enum MissionState {
888    #[doc = "The mission status reporting is not supported."]
889    MISSION_STATE_UNKNOWN = 0,
890    #[doc = "No mission on the vehicle."]
891    MISSION_STATE_NO_MISSION = 1,
892    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
893    MISSION_STATE_NOT_STARTED = 2,
894    #[doc = "Mission is active, and will execute mission items when in auto mode."]
895    MISSION_STATE_ACTIVE = 3,
896    #[doc = "Mission is paused when in auto mode."]
897    MISSION_STATE_PAUSED = 4,
898    #[doc = "Mission has executed all mission items."]
899    MISSION_STATE_COMPLETE = 5,
900}
901impl MissionState {
902    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
903}
904impl Default for MissionState {
905    fn default() -> Self {
906        Self::DEFAULT
907    }
908}
909#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
911#[cfg_attr(feature = "serde", serde(tag = "type"))]
912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
913#[repr(u32)]
914#[doc = "Enumeration of the ADSB altimeter types"]
915pub enum AdsbAltitudeType {
916    #[doc = "Altitude reported from a Baro source using QNH reference"]
917    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
918    #[doc = "Altitude reported from a GNSS source"]
919    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
920}
921impl AdsbAltitudeType {
922    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
923}
924impl Default for AdsbAltitudeType {
925    fn default() -> Self {
926        Self::DEFAULT
927    }
928}
929#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
931#[cfg_attr(feature = "serde", serde(tag = "type"))]
932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
933#[repr(u32)]
934#[doc = "Result from a MAVLink command (MAV_CMD)"]
935pub enum MavResult {
936    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
937    MAV_RESULT_ACCEPTED = 0,
938    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
939    MAV_RESULT_TEMPORARILY_REJECTED = 1,
940    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
941    MAV_RESULT_DENIED = 2,
942    #[doc = "Command is not supported (unknown)."]
943    MAV_RESULT_UNSUPPORTED = 3,
944    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
945    MAV_RESULT_FAILED = 4,
946    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
947    MAV_RESULT_IN_PROGRESS = 5,
948    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
949    MAV_RESULT_CANCELLED = 6,
950    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
951    MAV_RESULT_COMMAND_LONG_ONLY = 7,
952    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
953    MAV_RESULT_COMMAND_INT_ONLY = 8,
954    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
955    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
956}
957impl MavResult {
958    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
959}
960impl Default for MavResult {
961    fn default() -> Self {
962        Self::DEFAULT
963    }
964}
965bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
966impl MavGeneratorStatusFlag {
967    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
968}
969impl Default for MavGeneratorStatusFlag {
970    fn default() -> Self {
971        Self::DEFAULT
972    }
973}
974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
976#[cfg_attr(feature = "serde", serde(tag = "type"))]
977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
978#[repr(u32)]
979pub enum MavOdidClassEu {
980    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
981    MAV_ODID_CLASS_EU_UNDECLARED = 0,
982    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
983    MAV_ODID_CLASS_EU_CLASS_0 = 1,
984    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
985    MAV_ODID_CLASS_EU_CLASS_1 = 2,
986    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
987    MAV_ODID_CLASS_EU_CLASS_2 = 3,
988    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
989    MAV_ODID_CLASS_EU_CLASS_3 = 4,
990    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
991    MAV_ODID_CLASS_EU_CLASS_4 = 5,
992    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
993    MAV_ODID_CLASS_EU_CLASS_5 = 6,
994    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
995    MAV_ODID_CLASS_EU_CLASS_6 = 7,
996}
997impl MavOdidClassEu {
998    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
999}
1000impl Default for MavOdidClassEu {
1001    fn default() -> Self {
1002        Self::DEFAULT
1003    }
1004}
1005bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
1006impl MavSysStatusSensor {
1007    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
1008}
1009impl Default for MavSysStatusSensor {
1010    fn default() -> Self {
1011        Self::DEFAULT
1012    }
1013}
1014#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1016#[cfg_attr(feature = "serde", serde(tag = "type"))]
1017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1018#[repr(u32)]
1019#[doc = "Aircraft-rated danger from this threat."]
1020pub enum MavCollisionThreatLevel {
1021    #[doc = "Not a threat"]
1022    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1023    #[doc = "Craft is mildly concerned about this threat"]
1024    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1025    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1026    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1027}
1028impl MavCollisionThreatLevel {
1029    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1030}
1031impl Default for MavCollisionThreatLevel {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041pub enum MavOdidDescType {
1042    #[doc = "Optional free-form text description of the purpose of the flight."]
1043    MAV_ODID_DESC_TYPE_TEXT = 0,
1044    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
1045    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
1046    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
1047    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
1048}
1049impl MavOdidDescType {
1050    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
1051}
1052impl Default for MavOdidDescType {
1053    fn default() -> Self {
1054        Self::DEFAULT
1055    }
1056}
1057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1059#[cfg_attr(feature = "serde", serde(tag = "type"))]
1060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1061#[repr(u32)]
1062#[doc = "Possible responses from a CELLULAR_CONFIG message."]
1063pub enum CellularConfigResponse {
1064    #[doc = "Changes accepted."]
1065    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
1066    #[doc = "Invalid APN."]
1067    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
1068    #[doc = "Invalid PIN."]
1069    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
1070    #[doc = "Changes rejected."]
1071    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
1072    #[doc = "PUK is required to unblock SIM card."]
1073    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
1074}
1075impl CellularConfigResponse {
1076    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
1077}
1078impl Default for CellularConfigResponse {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1085#[cfg_attr(feature = "serde", serde(tag = "type"))]
1086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1087#[repr(u32)]
1088#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
1089pub enum RcType {
1090    #[doc = "Spektrum"]
1091    RC_TYPE_SPEKTRUM = 0,
1092    #[doc = "CRSF"]
1093    RC_TYPE_CRSF = 1,
1094}
1095impl RcType {
1096    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
1097}
1098impl Default for RcType {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
1109pub enum MotorTestThrottleType {
1110    #[doc = "Throttle as a percentage (0 ~ 100)"]
1111    MOTOR_TEST_THROTTLE_PERCENT = 0,
1112    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
1113    MOTOR_TEST_THROTTLE_PWM = 1,
1114    #[doc = "Throttle pass-through from pilot's transmitter."]
1115    MOTOR_TEST_THROTTLE_PILOT = 2,
1116    #[doc = "Per-motor compass calibration test."]
1117    MOTOR_TEST_COMPASS_CAL = 3,
1118}
1119impl MotorTestThrottleType {
1120    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
1121}
1122impl Default for MotorTestThrottleType {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
1128impl StorageUsageFlag {
1129    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
1130}
1131impl Default for StorageUsageFlag {
1132    fn default() -> Self {
1133        Self::DEFAULT
1134    }
1135}
1136#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1138#[cfg_attr(feature = "serde", serde(tag = "type"))]
1139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1140#[repr(u32)]
1141#[doc = "Video stream types"]
1142pub enum VideoStreamType {
1143    #[doc = "Stream is RTSP"]
1144    VIDEO_STREAM_TYPE_RTSP = 0,
1145    #[doc = "Stream is RTP UDP (URI gives the port number)"]
1146    VIDEO_STREAM_TYPE_RTPUDP = 1,
1147    #[doc = "Stream is MPEG on TCP"]
1148    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
1149    #[doc = "Stream is MPEG TS (URI gives the port number)"]
1150    VIDEO_STREAM_TYPE_MPEG_TS = 3,
1151}
1152impl VideoStreamType {
1153    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
1154}
1155impl Default for VideoStreamType {
1156    fn default() -> Self {
1157        Self::DEFAULT
1158    }
1159}
1160#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1162#[cfg_attr(feature = "serde", serde(tag = "type"))]
1163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1164#[repr(u32)]
1165#[doc = "WiFi Mode."]
1166pub enum WifiConfigApMode {
1167    #[doc = "WiFi mode is undefined."]
1168    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
1169    #[doc = "WiFi configured as an access point."]
1170    WIFI_CONFIG_AP_MODE_AP = 1,
1171    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
1172    WIFI_CONFIG_AP_MODE_STATION = 2,
1173    #[doc = "WiFi disabled."]
1174    WIFI_CONFIG_AP_MODE_DISABLED = 3,
1175}
1176impl WifiConfigApMode {
1177    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
1178}
1179impl Default for WifiConfigApMode {
1180    fn default() -> Self {
1181        Self::DEFAULT
1182    }
1183}
1184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1186#[cfg_attr(feature = "serde", serde(tag = "type"))]
1187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1188#[repr(u32)]
1189#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
1190pub enum WifiConfigApResponse {
1191    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
1192    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
1193    #[doc = "Changes accepted."]
1194    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
1195    #[doc = "Changes rejected."]
1196    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
1197    #[doc = "Invalid Mode."]
1198    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
1199    #[doc = "Invalid SSID."]
1200    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
1201    #[doc = "Invalid Password."]
1202    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
1203}
1204impl WifiConfigApResponse {
1205    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
1206}
1207impl Default for WifiConfigApResponse {
1208    fn default() -> Self {
1209        Self::DEFAULT
1210    }
1211}
1212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1214#[cfg_attr(feature = "serde", serde(tag = "type"))]
1215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1216#[repr(u32)]
1217#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
1218pub enum CellularNetworkFailedReason {
1219    #[doc = "No error"]
1220    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
1221    #[doc = "Error state is unknown"]
1222    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
1223    #[doc = "SIM is required for the modem but missing"]
1224    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
1225    #[doc = "SIM is available, but not usable for connection"]
1226    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
1227}
1228impl CellularNetworkFailedReason {
1229    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
1230}
1231impl Default for CellularNetworkFailedReason {
1232    fn default() -> Self {
1233        Self::DEFAULT
1234    }
1235}
1236#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1238#[cfg_attr(feature = "serde", serde(tag = "type"))]
1239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1240#[repr(u32)]
1241#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
1242pub enum AutotuneAxis {
1243    #[doc = "Autotune roll axis."]
1244    AUTOTUNE_AXIS_ROLL = 1,
1245    #[doc = "Autotune pitch axis."]
1246    AUTOTUNE_AXIS_PITCH = 2,
1247    #[doc = "Autotune yaw axis."]
1248    AUTOTUNE_AXIS_YAW = 4,
1249}
1250impl AutotuneAxis {
1251    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
1252}
1253impl Default for AutotuneAxis {
1254    fn default() -> Self {
1255        Self::DEFAULT
1256    }
1257}
1258#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1260#[cfg_attr(feature = "serde", serde(tag = "type"))]
1261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1262#[repr(u32)]
1263#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
1264pub enum RebootShutdownConditions {
1265    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
1266    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
1267    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
1268    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
1269}
1270impl RebootShutdownConditions {
1271    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
1272}
1273impl Default for RebootShutdownConditions {
1274    fn default() -> Self {
1275        Self::DEFAULT
1276    }
1277}
1278bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1279impl GimbalManagerFlags {
1280    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1281}
1282impl Default for GimbalManagerFlags {
1283    fn default() -> Self {
1284        Self::DEFAULT
1285    }
1286}
1287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1289#[cfg_attr(feature = "serde", serde(tag = "type"))]
1290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1291#[repr(u32)]
1292#[doc = "List of possible units where failures can be injected."]
1293pub enum FailureUnit {
1294    FAILURE_UNIT_SENSOR_GYRO = 0,
1295    FAILURE_UNIT_SENSOR_ACCEL = 1,
1296    FAILURE_UNIT_SENSOR_MAG = 2,
1297    FAILURE_UNIT_SENSOR_BARO = 3,
1298    FAILURE_UNIT_SENSOR_GPS = 4,
1299    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
1300    FAILURE_UNIT_SENSOR_VIO = 6,
1301    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
1302    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
1303    FAILURE_UNIT_SYSTEM_BATTERY = 100,
1304    FAILURE_UNIT_SYSTEM_MOTOR = 101,
1305    FAILURE_UNIT_SYSTEM_SERVO = 102,
1306    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
1307    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
1308    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
1309}
1310impl FailureUnit {
1311    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
1312}
1313impl Default for FailureUnit {
1314    fn default() -> Self {
1315        Self::DEFAULT
1316    }
1317}
1318bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
1319impl MavModeFlag {
1320    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
1321}
1322impl Default for MavModeFlag {
1323    fn default() -> Self {
1324        Self::DEFAULT
1325    }
1326}
1327#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1329#[cfg_attr(feature = "serde", serde(tag = "type"))]
1330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1331#[repr(u32)]
1332pub enum MavOdidHeightRef {
1333    #[doc = "The height field is relative to the take-off location."]
1334    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
1335    #[doc = "The height field is relative to ground."]
1336    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
1337}
1338impl MavOdidHeightRef {
1339    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
1340}
1341impl Default for MavOdidHeightRef {
1342    fn default() -> Self {
1343        Self::DEFAULT
1344    }
1345}
1346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1348#[cfg_attr(feature = "serde", serde(tag = "type"))]
1349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1350#[repr(u32)]
1351#[doc = "Type of mission items being requested/sent in mission protocol."]
1352pub enum MavMissionType {
1353    #[doc = "Items are mission commands for main mission."]
1354    MAV_MISSION_TYPE_MISSION = 0,
1355    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
1356    MAV_MISSION_TYPE_FENCE = 1,
1357    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
1358    MAV_MISSION_TYPE_RALLY = 2,
1359    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
1360    MAV_MISSION_TYPE_ALL = 255,
1361}
1362impl MavMissionType {
1363    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
1364}
1365impl Default for MavMissionType {
1366    fn default() -> Self {
1367        Self::DEFAULT
1368    }
1369}
1370#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1372#[cfg_attr(feature = "serde", serde(tag = "type"))]
1373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1374#[repr(u32)]
1375#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
1376pub enum MavRoi {
1377    #[doc = "No region of interest."]
1378    MAV_ROI_NONE = 0,
1379    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
1380    MAV_ROI_WPNEXT = 1,
1381    #[doc = "Point toward given waypoint."]
1382    MAV_ROI_WPINDEX = 2,
1383    #[doc = "Point toward fixed location."]
1384    MAV_ROI_LOCATION = 3,
1385    #[doc = "Point toward of given id."]
1386    MAV_ROI_TARGET = 4,
1387}
1388impl MavRoi {
1389    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
1390}
1391impl Default for MavRoi {
1392    fn default() -> Self {
1393        Self::DEFAULT
1394    }
1395}
1396#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1398#[cfg_attr(feature = "serde", serde(tag = "type"))]
1399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1400#[repr(u32)]
1401#[doc = "Enumeration of VTOL states"]
1402pub enum MavVtolState {
1403    #[doc = "MAV is not configured as VTOL"]
1404    MAV_VTOL_STATE_UNDEFINED = 0,
1405    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
1406    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
1407    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
1408    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
1409    #[doc = "VTOL is in multicopter state"]
1410    MAV_VTOL_STATE_MC = 3,
1411    #[doc = "VTOL is in fixed-wing state"]
1412    MAV_VTOL_STATE_FW = 4,
1413}
1414impl MavVtolState {
1415    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
1416}
1417impl Default for MavVtolState {
1418    fn default() -> Self {
1419        Self::DEFAULT
1420    }
1421}
1422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1424#[cfg_attr(feature = "serde", serde(tag = "type"))]
1425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1426#[repr(u32)]
1427#[doc = "Yaw behaviour during orbit flight."]
1428pub enum OrbitYawBehaviour {
1429    #[doc = "Vehicle front points to the center (default)."]
1430    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
1431    #[doc = "Vehicle front holds heading when message received."]
1432    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
1433    #[doc = "Yaw uncontrolled."]
1434    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
1435    #[doc = "Vehicle front follows flight path (tangential to circle)."]
1436    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
1437    #[doc = "Yaw controlled by RC input."]
1438    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
1439    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
1440    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
1441}
1442impl OrbitYawBehaviour {
1443    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
1444}
1445impl Default for OrbitYawBehaviour {
1446    fn default() -> Self {
1447        Self::DEFAULT
1448    }
1449}
1450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1452#[cfg_attr(feature = "serde", serde(tag = "type"))]
1453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1454#[repr(u32)]
1455#[doc = "Generalized UAVCAN node mode"]
1456pub enum UavcanNodeMode {
1457    #[doc = "The node is performing its primary functions."]
1458    UAVCAN_NODE_MODE_OPERATIONAL = 0,
1459    #[doc = "The node is initializing; this mode is entered immediately after startup."]
1460    UAVCAN_NODE_MODE_INITIALIZATION = 1,
1461    #[doc = "The node is under maintenance."]
1462    UAVCAN_NODE_MODE_MAINTENANCE = 2,
1463    #[doc = "The node is in the process of updating its software."]
1464    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
1465    #[doc = "The node is no longer available online."]
1466    UAVCAN_NODE_MODE_OFFLINE = 7,
1467}
1468impl UavcanNodeMode {
1469    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
1470}
1471impl Default for UavcanNodeMode {
1472    fn default() -> Self {
1473        Self::DEFAULT
1474    }
1475}
1476bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1477impl HilActuatorControlsFlags {
1478    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1479}
1480impl Default for HilActuatorControlsFlags {
1481    fn default() -> Self {
1482        Self::DEFAULT
1483    }
1484}
1485#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1487#[cfg_attr(feature = "serde", serde(tag = "type"))]
1488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1489#[repr(u32)]
1490#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
1491pub enum MavModeFlagDecodePosition {
1492    #[doc = "First bit:  10000000"]
1493    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
1494    #[doc = "Second bit: 01000000"]
1495    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
1496    #[doc = "Third bit:  00100000"]
1497    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
1498    #[doc = "Fourth bit: 00010000"]
1499    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
1500    #[doc = "Fifth bit:  00001000"]
1501    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
1502    #[doc = "Sixth bit:   00000100"]
1503    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
1504    #[doc = "Seventh bit: 00000010"]
1505    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
1506    #[doc = "Eighth bit: 00000001"]
1507    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
1508}
1509impl MavModeFlagDecodePosition {
1510    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
1511}
1512impl Default for MavModeFlagDecodePosition {
1513    fn default() -> Self {
1514        Self::DEFAULT
1515    }
1516}
1517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1519#[cfg_attr(feature = "serde", serde(tag = "type"))]
1520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1521#[repr(u32)]
1522#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
1523pub enum FenceType {
1524    #[doc = "Maximum altitude fence"]
1525    FENCE_TYPE_ALT_MAX = 1,
1526    #[doc = "Circle fence"]
1527    FENCE_TYPE_CIRCLE = 2,
1528    #[doc = "Polygon fence"]
1529    FENCE_TYPE_POLYGON = 4,
1530    #[doc = "Minimum altitude fence"]
1531    FENCE_TYPE_ALT_MIN = 8,
1532}
1533impl FenceType {
1534    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
1535}
1536impl Default for FenceType {
1537    fn default() -> Self {
1538        Self::DEFAULT
1539    }
1540}
1541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1543#[cfg_attr(feature = "serde", serde(tag = "type"))]
1544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1545#[repr(u32)]
1546#[doc = "Video stream encodings"]
1547pub enum VideoStreamEncoding {
1548    #[doc = "Stream encoding is unknown"]
1549    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
1550    #[doc = "Stream encoding is H.264"]
1551    VIDEO_STREAM_ENCODING_H264 = 1,
1552    #[doc = "Stream encoding is H.265"]
1553    VIDEO_STREAM_ENCODING_H265 = 2,
1554}
1555impl VideoStreamEncoding {
1556    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
1557}
1558impl Default for VideoStreamEncoding {
1559    fn default() -> Self {
1560        Self::DEFAULT
1561    }
1562}
1563bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
1564impl AisFlags {
1565    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
1566}
1567impl Default for AisFlags {
1568    fn default() -> Self {
1569        Self::DEFAULT
1570    }
1571}
1572#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1574#[cfg_attr(feature = "serde", serde(tag = "type"))]
1575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1576#[repr(u32)]
1577#[doc = "Result of mission operation (in a MISSION_ACK message)."]
1578pub enum MavMissionResult {
1579    #[doc = "mission accepted OK"]
1580    MAV_MISSION_ACCEPTED = 0,
1581    #[doc = "Generic error / not accepting mission commands at all right now."]
1582    MAV_MISSION_ERROR = 1,
1583    #[doc = "Coordinate frame is not supported."]
1584    MAV_MISSION_UNSUPPORTED_FRAME = 2,
1585    #[doc = "Command is not supported."]
1586    MAV_MISSION_UNSUPPORTED = 3,
1587    #[doc = "Mission items exceed storage space."]
1588    MAV_MISSION_NO_SPACE = 4,
1589    #[doc = "One of the parameters has an invalid value."]
1590    MAV_MISSION_INVALID = 5,
1591    #[doc = "param1 has an invalid value."]
1592    MAV_MISSION_INVALID_PARAM1 = 6,
1593    #[doc = "param2 has an invalid value."]
1594    MAV_MISSION_INVALID_PARAM2 = 7,
1595    #[doc = "param3 has an invalid value."]
1596    MAV_MISSION_INVALID_PARAM3 = 8,
1597    #[doc = "param4 has an invalid value."]
1598    MAV_MISSION_INVALID_PARAM4 = 9,
1599    #[doc = "x / param5 has an invalid value."]
1600    MAV_MISSION_INVALID_PARAM5_X = 10,
1601    #[doc = "y / param6 has an invalid value."]
1602    MAV_MISSION_INVALID_PARAM6_Y = 11,
1603    #[doc = "z / param7 has an invalid value."]
1604    MAV_MISSION_INVALID_PARAM7 = 12,
1605    #[doc = "Mission item received out of sequence"]
1606    MAV_MISSION_INVALID_SEQUENCE = 13,
1607    #[doc = "Not accepting any mission commands from this communication partner."]
1608    MAV_MISSION_DENIED = 14,
1609    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
1610    MAV_MISSION_OPERATION_CANCELLED = 15,
1611}
1612impl MavMissionResult {
1613    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
1614}
1615impl Default for MavMissionResult {
1616    fn default() -> Self {
1617        Self::DEFAULT
1618    }
1619}
1620bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
1621impl CameraCapFlags {
1622    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
1623}
1624impl Default for CameraCapFlags {
1625    fn default() -> Self {
1626        Self::DEFAULT
1627    }
1628}
1629#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1631#[cfg_attr(feature = "serde", serde(tag = "type"))]
1632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1633#[repr(u32)]
1634pub enum MagCalStatus {
1635    MAG_CAL_NOT_STARTED = 0,
1636    MAG_CAL_WAITING_TO_START = 1,
1637    MAG_CAL_RUNNING_STEP_ONE = 2,
1638    MAG_CAL_RUNNING_STEP_TWO = 3,
1639    MAG_CAL_SUCCESS = 4,
1640    MAG_CAL_FAILED = 5,
1641    MAG_CAL_BAD_ORIENTATION = 6,
1642    MAG_CAL_BAD_RADIUS = 7,
1643}
1644impl MagCalStatus {
1645    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1646}
1647impl Default for MagCalStatus {
1648    fn default() -> Self {
1649        Self::DEFAULT
1650    }
1651}
1652bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1653impl HilSensorUpdatedFlags {
1654    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1655}
1656impl Default for HilSensorUpdatedFlags {
1657    fn default() -> Self {
1658        Self::DEFAULT
1659    }
1660}
1661#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1663#[cfg_attr(feature = "serde", serde(tag = "type"))]
1664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1665#[repr(u32)]
1666pub enum MavTunnelPayloadType {
1667    #[doc = "Encoding of payload unknown."]
1668    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
1669    #[doc = "Registered for STorM32 gimbal controller."]
1670    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
1671    #[doc = "Registered for STorM32 gimbal controller."]
1672    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
1673    #[doc = "Registered for STorM32 gimbal controller."]
1674    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
1675    #[doc = "Registered for STorM32 gimbal controller."]
1676    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
1677    #[doc = "Registered for STorM32 gimbal controller."]
1678    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
1679    #[doc = "Registered for STorM32 gimbal controller."]
1680    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
1681    #[doc = "Registered for STorM32 gimbal controller."]
1682    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
1683    #[doc = "Registered for STorM32 gimbal controller."]
1684    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
1685    #[doc = "Registered for STorM32 gimbal controller."]
1686    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
1687    #[doc = "Registered for STorM32 gimbal controller."]
1688    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
1689    #[doc = "Registered for ModalAI remote OSD protocol."]
1690    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
1691    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
1692    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
1693    #[doc = "Registered for ModalAI vendor use."]
1694    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
1695}
1696impl MavTunnelPayloadType {
1697    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
1698}
1699impl Default for MavTunnelPayloadType {
1700    fn default() -> Self {
1701        Self::DEFAULT
1702    }
1703}
1704#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1706#[cfg_attr(feature = "serde", serde(tag = "type"))]
1707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1708#[repr(u32)]
1709#[doc = "List of possible failure type to inject."]
1710pub enum FailureType {
1711    #[doc = "No failure injected, used to reset a previous failure."]
1712    FAILURE_TYPE_OK = 0,
1713    #[doc = "Sets unit off, so completely non-responsive."]
1714    FAILURE_TYPE_OFF = 1,
1715    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
1716    FAILURE_TYPE_STUCK = 2,
1717    #[doc = "Unit is reporting complete garbage."]
1718    FAILURE_TYPE_GARBAGE = 3,
1719    #[doc = "Unit is consistently wrong."]
1720    FAILURE_TYPE_WRONG = 4,
1721    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
1722    FAILURE_TYPE_SLOW = 5,
1723    #[doc = "Data of unit is delayed in time."]
1724    FAILURE_TYPE_DELAYED = 6,
1725    #[doc = "Unit is sometimes working, sometimes not."]
1726    FAILURE_TYPE_INTERMITTENT = 7,
1727}
1728impl FailureType {
1729    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
1730}
1731impl Default for FailureType {
1732    fn default() -> Self {
1733        Self::DEFAULT
1734    }
1735}
1736#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1738#[cfg_attr(feature = "serde", serde(tag = "type"))]
1739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1740#[repr(u32)]
1741#[doc = "Flags to indicate the status of camera storage."]
1742pub enum StorageStatus {
1743    #[doc = "Storage is missing (no microSD card loaded for example.)"]
1744    STORAGE_STATUS_EMPTY = 0,
1745    #[doc = "Storage present but unformatted."]
1746    STORAGE_STATUS_UNFORMATTED = 1,
1747    #[doc = "Storage present and ready."]
1748    STORAGE_STATUS_READY = 2,
1749    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
1750    STORAGE_STATUS_NOT_SUPPORTED = 3,
1751}
1752impl StorageStatus {
1753    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
1754}
1755impl Default for StorageStatus {
1756    fn default() -> Self {
1757        Self::DEFAULT
1758    }
1759}
1760#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1762#[cfg_attr(feature = "serde", serde(tag = "type"))]
1763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1764#[repr(u32)]
1765#[doc = "Reason for an event error response."]
1766pub enum MavEventErrorReason {
1767    #[doc = "The requested event is not available (anymore)."]
1768    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
1769}
1770impl MavEventErrorReason {
1771    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
1772}
1773impl Default for MavEventErrorReason {
1774    fn default() -> Self {
1775        Self::DEFAULT
1776    }
1777}
1778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1780#[cfg_attr(feature = "serde", serde(tag = "type"))]
1781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1782#[repr(u32)]
1783#[doc = "Type of landing target"]
1784pub enum LandingTargetType {
1785    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1786    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1787    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1788    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1789    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1790    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1791    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1792    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1793}
1794impl LandingTargetType {
1795    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1796}
1797impl Default for LandingTargetType {
1798    fn default() -> Self {
1799        Self::DEFAULT
1800    }
1801}
1802#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1804#[cfg_attr(feature = "serde", serde(tag = "type"))]
1805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1806#[repr(u32)]
1807pub enum FenceBreach {
1808    #[doc = "No last fence breach"]
1809    FENCE_BREACH_NONE = 0,
1810    #[doc = "Breached minimum altitude"]
1811    FENCE_BREACH_MINALT = 1,
1812    #[doc = "Breached maximum altitude"]
1813    FENCE_BREACH_MAXALT = 2,
1814    #[doc = "Breached fence boundary"]
1815    FENCE_BREACH_BOUNDARY = 3,
1816}
1817impl FenceBreach {
1818    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
1819}
1820impl Default for FenceBreach {
1821    fn default() -> Self {
1822        Self::DEFAULT
1823    }
1824}
1825#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1827#[cfg_attr(feature = "serde", serde(tag = "type"))]
1828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1829#[repr(u32)]
1830pub enum MavOdidUaType {
1831    #[doc = "No UA (Unmanned Aircraft) type defined."]
1832    MAV_ODID_UA_TYPE_NONE = 0,
1833    #[doc = "Aeroplane/Airplane. Fixed wing."]
1834    MAV_ODID_UA_TYPE_AEROPLANE = 1,
1835    #[doc = "Helicopter or multirotor."]
1836    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
1837    #[doc = "Gyroplane."]
1838    MAV_ODID_UA_TYPE_GYROPLANE = 3,
1839    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
1840    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
1841    #[doc = "Ornithopter."]
1842    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
1843    #[doc = "Glider."]
1844    MAV_ODID_UA_TYPE_GLIDER = 6,
1845    #[doc = "Kite."]
1846    MAV_ODID_UA_TYPE_KITE = 7,
1847    #[doc = "Free Balloon."]
1848    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
1849    #[doc = "Captive Balloon."]
1850    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
1851    #[doc = "Airship. E.g. a blimp."]
1852    MAV_ODID_UA_TYPE_AIRSHIP = 10,
1853    #[doc = "Free Fall/Parachute (unpowered)."]
1854    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
1855    #[doc = "Rocket."]
1856    MAV_ODID_UA_TYPE_ROCKET = 12,
1857    #[doc = "Tethered powered aircraft."]
1858    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
1859    #[doc = "Ground Obstacle."]
1860    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
1861    #[doc = "Other type of aircraft not listed earlier."]
1862    MAV_ODID_UA_TYPE_OTHER = 15,
1863}
1864impl MavOdidUaType {
1865    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
1866}
1867impl Default for MavOdidUaType {
1868    fn default() -> Self {
1869        Self::DEFAULT
1870    }
1871}
1872#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1874#[cfg_attr(feature = "serde", serde(tag = "type"))]
1875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1876#[repr(u32)]
1877#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
1878pub enum MavGoto {
1879    #[doc = "Hold at the current position."]
1880    MAV_GOTO_DO_HOLD = 0,
1881    #[doc = "Continue with the next item in mission execution."]
1882    MAV_GOTO_DO_CONTINUE = 1,
1883    #[doc = "Hold at the current position of the system"]
1884    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
1885    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
1886    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
1887}
1888impl MavGoto {
1889    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
1890}
1891impl Default for MavGoto {
1892    fn default() -> Self {
1893        Self::DEFAULT
1894    }
1895}
1896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1898#[cfg_attr(feature = "serde", serde(tag = "type"))]
1899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1900#[repr(u32)]
1901#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
1902pub enum TuneFormat {
1903    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
1904    TUNE_FORMAT_QBASIC1_1 = 1,
1905    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
1906    TUNE_FORMAT_MML_MODERN = 2,
1907}
1908impl TuneFormat {
1909    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
1910}
1911impl Default for TuneFormat {
1912    fn default() -> Self {
1913        Self::DEFAULT
1914    }
1915}
1916#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1918#[cfg_attr(feature = "serde", serde(tag = "type"))]
1919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1920#[repr(u32)]
1921#[doc = "Enumeration of battery types"]
1922pub enum MavBatteryType {
1923    #[doc = "Not specified."]
1924    MAV_BATTERY_TYPE_UNKNOWN = 0,
1925    #[doc = "Lithium polymer battery"]
1926    MAV_BATTERY_TYPE_LIPO = 1,
1927    #[doc = "Lithium-iron-phosphate battery"]
1928    MAV_BATTERY_TYPE_LIFE = 2,
1929    #[doc = "Lithium-ION battery"]
1930    MAV_BATTERY_TYPE_LION = 3,
1931    #[doc = "Nickel metal hydride battery"]
1932    MAV_BATTERY_TYPE_NIMH = 4,
1933}
1934impl MavBatteryType {
1935    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1936}
1937impl Default for MavBatteryType {
1938    fn default() -> Self {
1939        Self::DEFAULT
1940    }
1941}
1942#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1944#[cfg_attr(feature = "serde", serde(tag = "type"))]
1945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1946#[repr(u32)]
1947pub enum MavOdidVerAcc {
1948    #[doc = "The vertical accuracy is unknown."]
1949    MAV_ODID_VER_ACC_UNKNOWN = 0,
1950    #[doc = "The vertical accuracy is smaller than 150 meter."]
1951    MAV_ODID_VER_ACC_150_METER = 1,
1952    #[doc = "The vertical accuracy is smaller than 45 meter."]
1953    MAV_ODID_VER_ACC_45_METER = 2,
1954    #[doc = "The vertical accuracy is smaller than 25 meter."]
1955    MAV_ODID_VER_ACC_25_METER = 3,
1956    #[doc = "The vertical accuracy is smaller than 10 meter."]
1957    MAV_ODID_VER_ACC_10_METER = 4,
1958    #[doc = "The vertical accuracy is smaller than 3 meter."]
1959    MAV_ODID_VER_ACC_3_METER = 5,
1960    #[doc = "The vertical accuracy is smaller than 1 meter."]
1961    MAV_ODID_VER_ACC_1_METER = 6,
1962}
1963impl MavOdidVerAcc {
1964    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
1965}
1966impl Default for MavOdidVerAcc {
1967    fn default() -> Self {
1968        Self::DEFAULT
1969    }
1970}
1971#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1973#[cfg_attr(feature = "serde", serde(tag = "type"))]
1974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1975#[repr(u32)]
1976#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
1977pub enum MavMode {
1978    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
1979    MAV_MODE_PREFLIGHT = 0,
1980    #[doc = "System is allowed to be active, under assisted RC control."]
1981    MAV_MODE_STABILIZE_DISARMED = 80,
1982    #[doc = "System is allowed to be active, under assisted RC control."]
1983    MAV_MODE_STABILIZE_ARMED = 208,
1984    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
1985    MAV_MODE_MANUAL_DISARMED = 64,
1986    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
1987    MAV_MODE_MANUAL_ARMED = 192,
1988    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
1989    MAV_MODE_GUIDED_DISARMED = 88,
1990    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
1991    MAV_MODE_GUIDED_ARMED = 216,
1992    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
1993    MAV_MODE_AUTO_DISARMED = 92,
1994    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
1995    MAV_MODE_AUTO_ARMED = 220,
1996    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
1997    MAV_MODE_TEST_DISARMED = 66,
1998    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
1999    MAV_MODE_TEST_ARMED = 194,
2000}
2001impl MavMode {
2002    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2003}
2004impl Default for MavMode {
2005    fn default() -> Self {
2006        Self::DEFAULT
2007    }
2008}
2009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
2010impl PositionTargetTypemask {
2011    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
2012}
2013impl Default for PositionTargetTypemask {
2014    fn default() -> Self {
2015        Self::DEFAULT
2016    }
2017}
2018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
2019impl EscFailureFlags {
2020    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
2021}
2022impl Default for EscFailureFlags {
2023    fn default() -> Self {
2024        Self::DEFAULT
2025    }
2026}
2027#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2029#[cfg_attr(feature = "serde", serde(tag = "type"))]
2030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2031#[repr(u32)]
2032#[doc = "Camera tracking modes"]
2033pub enum CameraTrackingMode {
2034    #[doc = "Not tracking"]
2035    CAMERA_TRACKING_MODE_NONE = 0,
2036    #[doc = "Target is a point"]
2037    CAMERA_TRACKING_MODE_POINT = 1,
2038    #[doc = "Target is a rectangle"]
2039    CAMERA_TRACKING_MODE_RECTANGLE = 2,
2040}
2041impl CameraTrackingMode {
2042    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
2043}
2044impl Default for CameraTrackingMode {
2045    fn default() -> Self {
2046        Self::DEFAULT
2047    }
2048}
2049#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2051#[cfg_attr(feature = "serde", serde(tag = "type"))]
2052#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2053#[repr(u32)]
2054#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
2055pub enum MavCmd {
2056    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
2057    MAV_CMD_NAV_WAYPOINT = 16,
2058    #[doc = "Loiter around this waypoint an unlimited amount of time"]
2059    MAV_CMD_NAV_LOITER_UNLIM = 17,
2060    #[doc = "Loiter around this waypoint for X turns"]
2061    MAV_CMD_NAV_LOITER_TURNS = 18,
2062    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
2063    MAV_CMD_NAV_LOITER_TIME = 19,
2064    #[doc = "Return to launch location"]
2065    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
2066    #[doc = "Land at location."]
2067    MAV_CMD_NAV_LAND = 21,
2068    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
2069    MAV_CMD_NAV_TAKEOFF = 22,
2070    #[doc = "Land at local position (local frame only)"]
2071    MAV_CMD_NAV_LAND_LOCAL = 23,
2072    #[doc = "Takeoff from local position (local frame only)"]
2073    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
2074    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
2075    MAV_CMD_NAV_FOLLOW = 25,
2076    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
2077    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
2078    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
2079    MAV_CMD_NAV_LOITER_TO_ALT = 31,
2080    #[doc = "Begin following a target"]
2081    MAV_CMD_DO_FOLLOW = 32,
2082    #[doc = "Reposition the MAV after a follow target command has been sent"]
2083    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
2084    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
2085    MAV_CMD_DO_ORBIT = 34,
2086    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2087    MAV_CMD_NAV_ROI = 80,
2088    #[doc = "Control autonomous path planning on the MAV."]
2089    MAV_CMD_NAV_PATHPLANNING = 81,
2090    #[doc = "Navigate to waypoint using a spline path."]
2091    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
2092    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
2093    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
2094    #[doc = "Land using VTOL mode"]
2095    MAV_CMD_NAV_VTOL_LAND = 85,
2096    #[doc = "hand control over to an external controller"]
2097    MAV_CMD_NAV_GUIDED_ENABLE = 92,
2098    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
2099    MAV_CMD_NAV_DELAY = 93,
2100    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
2101    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
2102    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
2103    MAV_CMD_NAV_LAST = 95,
2104    #[doc = "Delay mission state machine."]
2105    MAV_CMD_CONDITION_DELAY = 112,
2106    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
2107    MAV_CMD_CONDITION_CHANGE_ALT = 113,
2108    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
2109    MAV_CMD_CONDITION_DISTANCE = 114,
2110    #[doc = "Reach a certain target angle."]
2111    MAV_CMD_CONDITION_YAW = 115,
2112    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
2113    MAV_CMD_CONDITION_LAST = 159,
2114    #[doc = "Set system mode."]
2115    MAV_CMD_DO_SET_MODE = 176,
2116    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
2117    MAV_CMD_DO_JUMP = 177,
2118    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
2119    MAV_CMD_DO_CHANGE_SPEED = 178,
2120    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
2121    MAV_CMD_DO_SET_HOME = 179,
2122    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
2123    MAV_CMD_DO_SET_PARAMETER = 180,
2124    #[doc = "Set a relay to a condition."]
2125    MAV_CMD_DO_SET_RELAY = 181,
2126    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
2127    MAV_CMD_DO_REPEAT_RELAY = 182,
2128    #[doc = "Set a servo to a desired PWM value."]
2129    MAV_CMD_DO_SET_SERVO = 183,
2130    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
2131    MAV_CMD_DO_REPEAT_SERVO = 184,
2132    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
2133    MAV_CMD_DO_FLIGHTTERMINATION = 185,
2134    #[doc = "Change altitude set point."]
2135    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
2136    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
2137    MAV_CMD_DO_SET_ACTUATOR = 187,
2138    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
2139    MAV_CMD_DO_RETURN_PATH_START = 188,
2140    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
2141    MAV_CMD_DO_LAND_START = 189,
2142    #[doc = "Mission command to perform a landing from a rally point."]
2143    MAV_CMD_DO_RALLY_LAND = 190,
2144    #[doc = "Mission command to safely abort an autonomous landing."]
2145    MAV_CMD_DO_GO_AROUND = 191,
2146    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2147    MAV_CMD_DO_REPOSITION = 192,
2148    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2149    MAV_CMD_DO_PAUSE_CONTINUE = 193,
2150    #[doc = "Set moving direction to forward or reverse."]
2151    MAV_CMD_DO_SET_REVERSE = 194,
2152    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2153    MAV_CMD_DO_SET_ROI_LOCATION = 195,
2154    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2155    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2156    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2157    MAV_CMD_DO_SET_ROI_NONE = 197,
2158    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2159    MAV_CMD_DO_SET_ROI_SYSID = 198,
2160    #[doc = "Control onboard camera system."]
2161    MAV_CMD_DO_CONTROL_VIDEO = 200,
2162    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2163    MAV_CMD_DO_SET_ROI = 201,
2164    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2165    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2166    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2167    MAV_CMD_DO_DIGICAM_CONTROL = 203,
2168    #[doc = "Mission command to configure a camera or antenna mount"]
2169    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2170    #[doc = "Mission command to control a camera or antenna mount"]
2171    MAV_CMD_DO_MOUNT_CONTROL = 205,
2172    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2173    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2174    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
2175    MAV_CMD_DO_FENCE_ENABLE = 207,
2176    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2177    MAV_CMD_DO_PARACHUTE = 208,
2178    #[doc = "Command to perform motor test."]
2179    MAV_CMD_DO_MOTOR_TEST = 209,
2180    #[doc = "Change to/from inverted flight."]
2181    MAV_CMD_DO_INVERTED_FLIGHT = 210,
2182    #[doc = "Mission command to operate a gripper."]
2183    MAV_CMD_DO_GRIPPER = 211,
2184    #[doc = "Enable/disable autotune."]
2185    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2186    #[doc = "Sets a desired vehicle turn angle and speed change."]
2187    MAV_CMD_NAV_SET_YAW_SPEED = 213,
2188    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2189    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2190    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2191    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2192    #[doc = "set id of master controller"]
2193    MAV_CMD_DO_GUIDED_MASTER = 221,
2194    #[doc = "Set limits for external control"]
2195    MAV_CMD_DO_GUIDED_LIMITS = 222,
2196    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2197    MAV_CMD_DO_ENGINE_CONTROL = 223,
2198    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2199    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2200    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2201    MAV_CMD_DO_LAST = 240,
2202    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2203    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2204    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2205    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2206    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2207    MAV_CMD_PREFLIGHT_UAVCAN = 243,
2208    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2209    MAV_CMD_PREFLIGHT_STORAGE = 245,
2210    #[doc = "Request the reboot or shutdown of system components."]
2211    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2212    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2213    MAV_CMD_OVERRIDE_GOTO = 252,
2214    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2215    MAV_CMD_OBLIQUE_SURVEY = 260,
2216    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
2217    MAV_CMD_DO_SET_STANDARD_MODE = 262,
2218    #[doc = "start running a mission"]
2219    MAV_CMD_MISSION_START = 300,
2220    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2221    MAV_CMD_ACTUATOR_TEST = 310,
2222    #[doc = "Actuator configuration command."]
2223    MAV_CMD_CONFIGURE_ACTUATOR = 311,
2224    #[doc = "Arms / Disarms a component"]
2225    MAV_CMD_COMPONENT_ARM_DISARM = 400,
2226    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2227    MAV_CMD_RUN_PREARM_CHECKS = 401,
2228    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2229    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2230    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2231    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2232    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
2233    MAV_CMD_GET_HOME_POSITION = 410,
2234    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2235    MAV_CMD_INJECT_FAILURE = 420,
2236    #[doc = "Starts receiver pairing."]
2237    MAV_CMD_START_RX_PAIR = 500,
2238    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2239    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2240    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2241    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2242    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2243    MAV_CMD_REQUEST_MESSAGE = 512,
2244    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2245    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2246    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2247    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2248    #[doc = "Request camera information (CAMERA_INFORMATION)."]
2249    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2250    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2251    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2252    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2253    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2254    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2255    MAV_CMD_STORAGE_FORMAT = 526,
2256    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2257    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2258    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2259    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2260    #[doc = "Reset all camera settings to Factory Default"]
2261    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2262    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2263    MAV_CMD_SET_CAMERA_MODE = 530,
2264    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2265    MAV_CMD_SET_CAMERA_ZOOM = 531,
2266    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2267    MAV_CMD_SET_CAMERA_FOCUS = 532,
2268    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2269    MAV_CMD_SET_STORAGE_USAGE = 533,
2270    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2271    MAV_CMD_SET_CAMERA_SOURCE = 534,
2272    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2273    MAV_CMD_JUMP_TAG = 600,
2274    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2275    MAV_CMD_DO_JUMP_TAG = 601,
2276    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2277    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2278    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2279    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2280    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2281    MAV_CMD_IMAGE_START_CAPTURE = 2000,
2282    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2283    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2284    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2285    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2286    #[doc = "Enable or disable on-board camera triggering system."]
2287    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2288    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2289    MAV_CMD_CAMERA_TRACK_POINT = 2004,
2290    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2291    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2292    #[doc = "Stops ongoing tracking."]
2293    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2294    #[doc = "Starts video capture (recording)."]
2295    MAV_CMD_VIDEO_START_CAPTURE = 2500,
2296    #[doc = "Stop the current video capture (recording)."]
2297    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2298    #[doc = "Start video streaming"]
2299    MAV_CMD_VIDEO_START_STREAMING = 2502,
2300    #[doc = "Stop the given video stream"]
2301    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2302    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2303    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
2304    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
2305    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
2306    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
2307    MAV_CMD_LOGGING_START = 2510,
2308    #[doc = "Request to stop streaming log data over MAVLink"]
2309    MAV_CMD_LOGGING_STOP = 2511,
2310    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
2311    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
2312    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
2313    #[doc = "Create a panorama at the current position"]
2314    MAV_CMD_PANORAMA_CREATE = 2800,
2315    #[doc = "Request VTOL transition"]
2316    MAV_CMD_DO_VTOL_TRANSITION = 3000,
2317    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
2318    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
2319    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
2320    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
2321    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
2322    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
2323    #[doc = "Delay mission state machine until gate has been reached."]
2324    MAV_CMD_CONDITION_GATE = 4501,
2325    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
2326    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
2327    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2328    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
2329    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
2330    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
2331    #[doc = "Circular fence area. The vehicle must stay inside this area."]
2332    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
2333    #[doc = "Circular fence area. The vehicle must stay outside this area."]
2334    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
2335    #[doc = "Rally point. You can have multiple rally points defined."]
2336    MAV_CMD_NAV_RALLY_POINT = 5100,
2337    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
2338    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
2339    #[doc = "Change state of safety switch."]
2340    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
2341    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
2342    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
2343    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
2344    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
2345    #[doc = "Control the payload deployment."]
2346    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
2347    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
2348    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
2349    #[doc = "Command to operate winch."]
2350    MAV_CMD_DO_WINCH = 42600,
2351    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
2352    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
2353    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2354    MAV_CMD_WAYPOINT_USER_1 = 31000,
2355    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2356    MAV_CMD_WAYPOINT_USER_2 = 31001,
2357    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2358    MAV_CMD_WAYPOINT_USER_3 = 31002,
2359    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2360    MAV_CMD_WAYPOINT_USER_4 = 31003,
2361    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
2362    MAV_CMD_WAYPOINT_USER_5 = 31004,
2363    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2364    MAV_CMD_SPATIAL_USER_1 = 31005,
2365    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2366    MAV_CMD_SPATIAL_USER_2 = 31006,
2367    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2368    MAV_CMD_SPATIAL_USER_3 = 31007,
2369    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2370    MAV_CMD_SPATIAL_USER_4 = 31008,
2371    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
2372    MAV_CMD_SPATIAL_USER_5 = 31009,
2373    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2374    MAV_CMD_USER_1 = 31010,
2375    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2376    MAV_CMD_USER_2 = 31011,
2377    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2378    MAV_CMD_USER_3 = 31012,
2379    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2380    MAV_CMD_USER_4 = 31013,
2381    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
2382    MAV_CMD_USER_5 = 31014,
2383    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
2384    MAV_CMD_CAN_FORWARD = 32000,
2385}
2386impl MavCmd {
2387    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
2388}
2389impl Default for MavCmd {
2390    fn default() -> Self {
2391        Self::DEFAULT
2392    }
2393}
2394bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
2395impl AttitudeTargetTypemask {
2396    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
2397}
2398impl Default for AttitudeTargetTypemask {
2399    fn default() -> Self {
2400        Self::DEFAULT
2401    }
2402}
2403bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
2404impl IlluminatorErrorFlags {
2405    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
2406}
2407impl Default for IlluminatorErrorFlags {
2408    fn default() -> Self {
2409        Self::DEFAULT
2410    }
2411}
2412#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2414#[cfg_attr(feature = "serde", serde(tag = "type"))]
2415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2416#[repr(u32)]
2417#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2418pub enum MavDataStream {
2419    #[doc = "Enable all data streams"]
2420    MAV_DATA_STREAM_ALL = 0,
2421    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2422    MAV_DATA_STREAM_RAW_SENSORS = 1,
2423    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2424    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2425    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2426    MAV_DATA_STREAM_RC_CHANNELS = 3,
2427    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2428    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2429    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2430    MAV_DATA_STREAM_POSITION = 6,
2431    #[doc = "Dependent on the autopilot"]
2432    MAV_DATA_STREAM_EXTRA1 = 10,
2433    #[doc = "Dependent on the autopilot"]
2434    MAV_DATA_STREAM_EXTRA2 = 11,
2435    #[doc = "Dependent on the autopilot"]
2436    MAV_DATA_STREAM_EXTRA3 = 12,
2437}
2438impl MavDataStream {
2439    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2440}
2441impl Default for MavDataStream {
2442    fn default() -> Self {
2443        Self::DEFAULT
2444    }
2445}
2446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2448#[cfg_attr(feature = "serde", serde(tag = "type"))]
2449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2450#[repr(u32)]
2451pub enum MavOdidSpeedAcc {
2452    #[doc = "The speed accuracy is unknown."]
2453    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2454    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2455    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2456    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2457    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2458    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2459    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2460    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2461    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2462}
2463impl MavOdidSpeedAcc {
2464    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2465}
2466impl Default for MavOdidSpeedAcc {
2467    fn default() -> Self {
2468        Self::DEFAULT
2469    }
2470}
2471#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2473#[cfg_attr(feature = "serde", serde(tag = "type"))]
2474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2475#[repr(u32)]
2476pub enum MavOdidAuthType {
2477    #[doc = "No authentication type is specified."]
2478    MAV_ODID_AUTH_TYPE_NONE = 0,
2479    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2480    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2481    #[doc = "Signature for the Operator ID."]
2482    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2483    #[doc = "Signature for the entire message set."]
2484    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2485    #[doc = "Authentication is provided by Network Remote ID."]
2486    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2487    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2488    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2489}
2490impl MavOdidAuthType {
2491    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2492}
2493impl Default for MavOdidAuthType {
2494    fn default() -> Self {
2495        Self::DEFAULT
2496    }
2497}
2498bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
2499impl GimbalDeviceFlags {
2500    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
2501}
2502impl Default for GimbalDeviceFlags {
2503    fn default() -> Self {
2504        Self::DEFAULT
2505    }
2506}
2507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2509#[cfg_attr(feature = "serde", serde(tag = "type"))]
2510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2511#[repr(u32)]
2512#[doc = "Source of information about this collision."]
2513pub enum MavCollisionSrc {
2514    #[doc = "ID field references ADSB_VEHICLE packets"]
2515    MAV_COLLISION_SRC_ADSB = 0,
2516    #[doc = "ID field references MAVLink SRC ID"]
2517    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
2518}
2519impl MavCollisionSrc {
2520    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
2521}
2522impl Default for MavCollisionSrc {
2523    fn default() -> Self {
2524        Self::DEFAULT
2525    }
2526}
2527#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2529#[cfg_attr(feature = "serde", serde(tag = "type"))]
2530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2531#[repr(u32)]
2532#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
2533pub enum MavAutopilot {
2534    #[doc = "Generic autopilot, full support for everything"]
2535    MAV_AUTOPILOT_GENERIC = 0,
2536    #[doc = "Reserved for future use."]
2537    MAV_AUTOPILOT_RESERVED = 1,
2538    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
2539    MAV_AUTOPILOT_SLUGS = 2,
2540    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
2541    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
2542    #[doc = "OpenPilot, <http://openpilot.org>"]
2543    MAV_AUTOPILOT_OPENPILOT = 4,
2544    #[doc = "Generic autopilot only supporting simple waypoints"]
2545    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
2546    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
2547    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
2548    #[doc = "Generic autopilot supporting the full mission command set"]
2549    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
2550    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
2551    MAV_AUTOPILOT_INVALID = 8,
2552    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
2553    MAV_AUTOPILOT_PPZ = 9,
2554    #[doc = "UAV Dev Board"]
2555    MAV_AUTOPILOT_UDB = 10,
2556    #[doc = "FlexiPilot"]
2557    MAV_AUTOPILOT_FP = 11,
2558    #[doc = "PX4 Autopilot - <http://px4.io/>"]
2559    MAV_AUTOPILOT_PX4 = 12,
2560    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
2561    MAV_AUTOPILOT_SMACCMPILOT = 13,
2562    #[doc = "AutoQuad -- <http://autoquad.org>"]
2563    MAV_AUTOPILOT_AUTOQUAD = 14,
2564    #[doc = "Armazila -- <http://armazila.com>"]
2565    MAV_AUTOPILOT_ARMAZILA = 15,
2566    #[doc = "Aerob -- <http://aerob.ru>"]
2567    MAV_AUTOPILOT_AEROB = 16,
2568    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
2569    MAV_AUTOPILOT_ASLUAV = 17,
2570    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
2571    MAV_AUTOPILOT_SMARTAP = 18,
2572    #[doc = "AirRails - <http://uaventure.com>"]
2573    MAV_AUTOPILOT_AIRRAILS = 19,
2574    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
2575    MAV_AUTOPILOT_REFLEX = 20,
2576}
2577impl MavAutopilot {
2578    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
2579}
2580impl Default for MavAutopilot {
2581    fn default() -> Self {
2582        Self::DEFAULT
2583    }
2584}
2585#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2587#[cfg_attr(feature = "serde", serde(tag = "type"))]
2588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2589#[repr(u32)]
2590pub enum MavOdidOperatorLocationType {
2591    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2592    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2593    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2594    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2595    #[doc = "The location/altitude of the operator are fixed values."]
2596    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2597}
2598impl MavOdidOperatorLocationType {
2599    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2600}
2601impl Default for MavOdidOperatorLocationType {
2602    fn default() -> Self {
2603        Self::DEFAULT
2604    }
2605}
2606#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2608#[cfg_attr(feature = "serde", serde(tag = "type"))]
2609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2610#[repr(u32)]
2611#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
2612pub enum MavBatteryMode {
2613    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
2614    MAV_BATTERY_MODE_UNKNOWN = 0,
2615    #[doc = "Battery is auto discharging (towards storage level)."]
2616    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
2617    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
2618    MAV_BATTERY_MODE_HOT_SWAP = 2,
2619}
2620impl MavBatteryMode {
2621    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
2622}
2623impl Default for MavBatteryMode {
2624    fn default() -> Self {
2625        Self::DEFAULT
2626    }
2627}
2628#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2630#[cfg_attr(feature = "serde", serde(tag = "type"))]
2631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2632#[repr(u32)]
2633#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
2634pub enum ActuatorConfiguration {
2635    #[doc = "Do nothing."]
2636    ACTUATOR_CONFIGURATION_NONE = 0,
2637    #[doc = "Command the actuator to beep now."]
2638    ACTUATOR_CONFIGURATION_BEEP = 1,
2639    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
2640    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
2641    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
2642    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
2643    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
2644    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
2645    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
2646    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
2647}
2648impl ActuatorConfiguration {
2649    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
2650}
2651impl Default for ActuatorConfiguration {
2652    fn default() -> Self {
2653        Self::DEFAULT
2654    }
2655}
2656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2658#[cfg_attr(feature = "serde", serde(tag = "type"))]
2659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2660#[repr(u32)]
2661#[doc = "Possible actions an aircraft can take to avoid a collision."]
2662pub enum MavCollisionAction {
2663    #[doc = "Ignore any potential collisions"]
2664    MAV_COLLISION_ACTION_NONE = 0,
2665    #[doc = "Report potential collision"]
2666    MAV_COLLISION_ACTION_REPORT = 1,
2667    #[doc = "Ascend or Descend to avoid threat"]
2668    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
2669    #[doc = "Move horizontally to avoid threat"]
2670    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
2671    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
2672    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
2673    #[doc = "Aircraft to fly directly back to its launch point"]
2674    MAV_COLLISION_ACTION_RTL = 5,
2675    #[doc = "Aircraft to stop in place"]
2676    MAV_COLLISION_ACTION_HOVER = 6,
2677}
2678impl MavCollisionAction {
2679    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
2680}
2681impl Default for MavCollisionAction {
2682    fn default() -> Self {
2683        Self::DEFAULT
2684    }
2685}
2686#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2688#[cfg_attr(feature = "serde", serde(tag = "type"))]
2689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2690#[repr(u32)]
2691pub enum NavVtolLandOptions {
2692    #[doc = "Default autopilot landing behaviour."]
2693    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
2694    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
2695    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
2696    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
2697    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
2698}
2699impl NavVtolLandOptions {
2700    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
2701}
2702impl Default for NavVtolLandOptions {
2703    fn default() -> Self {
2704        Self::DEFAULT
2705    }
2706}
2707bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
2708impl HlFailureFlag {
2709    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
2710}
2711impl Default for HlFailureFlag {
2712    fn default() -> Self {
2713        Self::DEFAULT
2714    }
2715}
2716#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2718#[cfg_attr(feature = "serde", serde(tag = "type"))]
2719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2720#[repr(u32)]
2721pub enum MavlinkDataStreamType {
2722    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
2723    MAVLINK_DATA_STREAM_IMG_BMP = 1,
2724    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
2725    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
2726    MAVLINK_DATA_STREAM_IMG_PGM = 4,
2727    MAVLINK_DATA_STREAM_IMG_PNG = 5,
2728}
2729impl MavlinkDataStreamType {
2730    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
2731}
2732impl Default for MavlinkDataStreamType {
2733    fn default() -> Self {
2734        Self::DEFAULT
2735    }
2736}
2737#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2739#[cfg_attr(feature = "serde", serde(tag = "type"))]
2740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2741#[repr(u32)]
2742#[doc = "Generalized UAVCAN node health"]
2743pub enum UavcanNodeHealth {
2744    #[doc = "The node is functioning properly."]
2745    UAVCAN_NODE_HEALTH_OK = 0,
2746    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
2747    UAVCAN_NODE_HEALTH_WARNING = 1,
2748    #[doc = "The node has encountered a major failure."]
2749    UAVCAN_NODE_HEALTH_ERROR = 2,
2750    #[doc = "The node has suffered a fatal malfunction."]
2751    UAVCAN_NODE_HEALTH_CRITICAL = 3,
2752}
2753impl UavcanNodeHealth {
2754    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
2755}
2756impl Default for UavcanNodeHealth {
2757    fn default() -> Self {
2758        Self::DEFAULT
2759    }
2760}
2761bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
2762impl EstimatorStatusFlags {
2763    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
2764}
2765impl Default for EstimatorStatusFlags {
2766    fn default() -> Self {
2767        Self::DEFAULT
2768    }
2769}
2770#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2772#[cfg_attr(feature = "serde", serde(tag = "type"))]
2773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2774#[repr(u32)]
2775#[doc = "Enumeration of sensor orientation, according to its rotations"]
2776pub enum MavSensorOrientation {
2777    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
2778    MAV_SENSOR_ROTATION_NONE = 0,
2779    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
2780    MAV_SENSOR_ROTATION_YAW_45 = 1,
2781    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
2782    MAV_SENSOR_ROTATION_YAW_90 = 2,
2783    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
2784    MAV_SENSOR_ROTATION_YAW_135 = 3,
2785    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
2786    MAV_SENSOR_ROTATION_YAW_180 = 4,
2787    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
2788    MAV_SENSOR_ROTATION_YAW_225 = 5,
2789    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
2790    MAV_SENSOR_ROTATION_YAW_270 = 6,
2791    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
2792    MAV_SENSOR_ROTATION_YAW_315 = 7,
2793    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
2794    MAV_SENSOR_ROTATION_ROLL_180 = 8,
2795    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
2796    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
2797    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
2798    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
2799    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
2800    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
2801    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
2802    MAV_SENSOR_ROTATION_PITCH_180 = 12,
2803    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
2804    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
2805    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
2806    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
2807    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
2808    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
2809    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
2810    MAV_SENSOR_ROTATION_ROLL_90 = 16,
2811    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
2812    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
2813    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
2814    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
2815    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
2816    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
2817    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
2818    MAV_SENSOR_ROTATION_ROLL_270 = 20,
2819    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
2820    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
2821    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
2822    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
2823    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
2824    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
2825    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
2826    MAV_SENSOR_ROTATION_PITCH_90 = 24,
2827    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
2828    MAV_SENSOR_ROTATION_PITCH_270 = 25,
2829    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
2830    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
2831    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
2832    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
2833    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
2834    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
2835    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
2836    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
2837    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
2838    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
2839    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
2840    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
2841    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
2842    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
2843    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
2844    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
2845    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
2846    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
2847    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
2848    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
2849    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
2850    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
2851    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
2852    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
2853    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
2854    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
2855    #[doc = "Pitch: 315"]
2856    MAV_SENSOR_ROTATION_PITCH_315 = 39,
2857    #[doc = "Roll: 90, Pitch: 315"]
2858    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
2859    #[doc = "Custom orientation"]
2860    MAV_SENSOR_ROTATION_CUSTOM = 100,
2861}
2862impl MavSensorOrientation {
2863    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
2864}
2865impl Default for MavSensorOrientation {
2866    fn default() -> Self {
2867        Self::DEFAULT
2868    }
2869}
2870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2872#[cfg_attr(feature = "serde", serde(tag = "type"))]
2873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2874#[repr(u32)]
2875#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
2876pub enum RcSubType {
2877    #[doc = "Spektrum DSM2"]
2878    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
2879    #[doc = "Spektrum DSMX"]
2880    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
2881    #[doc = "Spektrum DSMX8"]
2882    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
2883}
2884impl RcSubType {
2885    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
2886}
2887impl Default for RcSubType {
2888    fn default() -> Self {
2889        Self::DEFAULT
2890    }
2891}
2892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2894#[cfg_attr(feature = "serde", serde(tag = "type"))]
2895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2896#[repr(u32)]
2897#[doc = "Specifies the datatype of a MAVLink extended parameter."]
2898pub enum MavParamExtType {
2899    #[doc = "8-bit unsigned integer"]
2900    MAV_PARAM_EXT_TYPE_UINT8 = 1,
2901    #[doc = "8-bit signed integer"]
2902    MAV_PARAM_EXT_TYPE_INT8 = 2,
2903    #[doc = "16-bit unsigned integer"]
2904    MAV_PARAM_EXT_TYPE_UINT16 = 3,
2905    #[doc = "16-bit signed integer"]
2906    MAV_PARAM_EXT_TYPE_INT16 = 4,
2907    #[doc = "32-bit unsigned integer"]
2908    MAV_PARAM_EXT_TYPE_UINT32 = 5,
2909    #[doc = "32-bit signed integer"]
2910    MAV_PARAM_EXT_TYPE_INT32 = 6,
2911    #[doc = "64-bit unsigned integer"]
2912    MAV_PARAM_EXT_TYPE_UINT64 = 7,
2913    #[doc = "64-bit signed integer"]
2914    MAV_PARAM_EXT_TYPE_INT64 = 8,
2915    #[doc = "32-bit floating-point"]
2916    MAV_PARAM_EXT_TYPE_REAL32 = 9,
2917    #[doc = "64-bit floating-point"]
2918    MAV_PARAM_EXT_TYPE_REAL64 = 10,
2919    #[doc = "Custom Type"]
2920    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
2921}
2922impl MavParamExtType {
2923    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
2924}
2925impl Default for MavParamExtType {
2926    fn default() -> Self {
2927        Self::DEFAULT
2928    }
2929}
2930#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2932#[cfg_attr(feature = "serde", serde(tag = "type"))]
2933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2934#[repr(u32)]
2935#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2936pub enum MavFrame {
2937    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2938    MAV_FRAME_GLOBAL = 0,
2939    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2940    MAV_FRAME_LOCAL_NED = 1,
2941    #[doc = "NOT a coordinate frame, indicates a mission command."]
2942    MAV_FRAME_MISSION = 2,
2943    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2944    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2945    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2946    MAV_FRAME_LOCAL_ENU = 4,
2947    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2948    MAV_FRAME_GLOBAL_INT = 5,
2949    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2950    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2951    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2952    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2953    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2954    MAV_FRAME_BODY_NED = 8,
2955    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2956    MAV_FRAME_BODY_OFFSET_NED = 9,
2957    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2958    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2959    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2960    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2961    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2962    MAV_FRAME_BODY_FRD = 12,
2963    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2964    MAV_FRAME_RESERVED_13 = 13,
2965    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2966    MAV_FRAME_RESERVED_14 = 14,
2967    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2968    MAV_FRAME_RESERVED_15 = 15,
2969    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2970    MAV_FRAME_RESERVED_16 = 16,
2971    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2972    MAV_FRAME_RESERVED_17 = 17,
2973    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2974    MAV_FRAME_RESERVED_18 = 18,
2975    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2976    MAV_FRAME_RESERVED_19 = 19,
2977    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2978    MAV_FRAME_LOCAL_FRD = 20,
2979    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2980    MAV_FRAME_LOCAL_FLU = 21,
2981}
2982impl MavFrame {
2983    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2984}
2985impl Default for MavFrame {
2986    fn default() -> Self {
2987        Self::DEFAULT
2988    }
2989}
2990#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2992#[cfg_attr(feature = "serde", serde(tag = "type"))]
2993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2994#[repr(u32)]
2995#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2996pub enum MavEventCurrentSequenceFlags {
2997    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2998    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2999}
3000impl MavEventCurrentSequenceFlags {
3001    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
3002}
3003impl Default for MavEventCurrentSequenceFlags {
3004    fn default() -> Self {
3005        Self::DEFAULT
3006    }
3007}
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidIdType {
3014    #[doc = "No type defined."]
3015    MAV_ODID_ID_TYPE_NONE = 0,
3016    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3017    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3018    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3019    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3020    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3021    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3022    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3023    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3024}
3025impl MavOdidIdType {
3026    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3027}
3028impl Default for MavOdidIdType {
3029    fn default() -> Self {
3030        Self::DEFAULT
3031    }
3032}
3033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3035#[cfg_attr(feature = "serde", serde(tag = "type"))]
3036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3037#[repr(u32)]
3038#[doc = "Direction of VTOL transition"]
3039pub enum VtolTransitionHeading {
3040    #[doc = "Respect the heading configuration of the vehicle."]
3041    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
3042    #[doc = "Use the heading pointing towards the next waypoint."]
3043    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
3044    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
3045    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
3046    #[doc = "Use the specified heading in parameter 4."]
3047    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
3048    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
3049    VTOL_TRANSITION_HEADING_ANY = 4,
3050}
3051impl VtolTransitionHeading {
3052    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
3053}
3054impl Default for VtolTransitionHeading {
3055    fn default() -> Self {
3056        Self::DEFAULT
3057    }
3058}
3059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3061#[cfg_attr(feature = "serde", serde(tag = "type"))]
3062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3063#[repr(u32)]
3064#[doc = "Modes of illuminator"]
3065pub enum IlluminatorMode {
3066    #[doc = "Illuminator mode is not specified/unknown"]
3067    ILLUMINATOR_MODE_UNKNOWN = 0,
3068    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
3069    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
3070    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
3071    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
3072}
3073impl IlluminatorMode {
3074    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
3075}
3076impl Default for IlluminatorMode {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3083#[cfg_attr(feature = "serde", serde(tag = "type"))]
3084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3085#[repr(u32)]
3086#[doc = "Camera Modes."]
3087pub enum CameraMode {
3088    #[doc = "Camera is in image/photo capture mode."]
3089    CAMERA_MODE_IMAGE = 0,
3090    #[doc = "Camera is in video capture mode."]
3091    CAMERA_MODE_VIDEO = 1,
3092    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
3093    CAMERA_MODE_IMAGE_SURVEY = 2,
3094}
3095impl CameraMode {
3096    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
3097}
3098impl Default for CameraMode {
3099    fn default() -> Self {
3100        Self::DEFAULT
3101    }
3102}
3103bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3104impl MavSysStatusSensorExtended {
3105    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3106}
3107impl Default for MavSysStatusSensorExtended {
3108    fn default() -> Self {
3109        Self::DEFAULT
3110    }
3111}
3112#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3114#[cfg_attr(feature = "serde", serde(tag = "type"))]
3115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3116#[repr(u32)]
3117#[doc = "Enumeration of estimator types"]
3118pub enum MavEstimatorType {
3119    #[doc = "Unknown type of the estimator."]
3120    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
3121    #[doc = "This is a naive estimator without any real covariance feedback."]
3122    MAV_ESTIMATOR_TYPE_NAIVE = 1,
3123    #[doc = "Computer vision based estimate. Might be up to scale."]
3124    MAV_ESTIMATOR_TYPE_VISION = 2,
3125    #[doc = "Visual-inertial estimate."]
3126    MAV_ESTIMATOR_TYPE_VIO = 3,
3127    #[doc = "Plain GPS estimate."]
3128    MAV_ESTIMATOR_TYPE_GPS = 4,
3129    #[doc = "Estimator integrating GPS and inertial sensing."]
3130    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
3131    #[doc = "Estimate from external motion capturing system."]
3132    MAV_ESTIMATOR_TYPE_MOCAP = 6,
3133    #[doc = "Estimator based on lidar sensor input."]
3134    MAV_ESTIMATOR_TYPE_LIDAR = 7,
3135    #[doc = "Estimator on autopilot."]
3136    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
3137}
3138impl MavEstimatorType {
3139    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
3140}
3141impl Default for MavEstimatorType {
3142    fn default() -> Self {
3143        Self::DEFAULT
3144    }
3145}
3146bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3147impl MavPowerStatus {
3148    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3149}
3150impl Default for MavPowerStatus {
3151    fn default() -> Self {
3152        Self::DEFAULT
3153    }
3154}
3155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3157#[cfg_attr(feature = "serde", serde(tag = "type"))]
3158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3159#[repr(u32)]
3160pub enum MavOdidStatus {
3161    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3162    MAV_ODID_STATUS_UNDECLARED = 0,
3163    #[doc = "The UA is on the ground."]
3164    MAV_ODID_STATUS_GROUND = 1,
3165    #[doc = "The UA is in the air."]
3166    MAV_ODID_STATUS_AIRBORNE = 2,
3167    #[doc = "The UA is having an emergency."]
3168    MAV_ODID_STATUS_EMERGENCY = 3,
3169    #[doc = "The remote ID system is failing or unreliable in some way."]
3170    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3171}
3172impl MavOdidStatus {
3173    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3174}
3175impl Default for MavOdidStatus {
3176    fn default() -> Self {
3177        Self::DEFAULT
3178    }
3179}
3180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3182#[cfg_attr(feature = "serde", serde(tag = "type"))]
3183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3184#[repr(u32)]
3185#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
3186pub enum SetFocusType {
3187    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
3188    FOCUS_TYPE_STEP = 0,
3189    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
3190    FOCUS_TYPE_CONTINUOUS = 1,
3191    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
3192    FOCUS_TYPE_RANGE = 2,
3193    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
3194    FOCUS_TYPE_METERS = 3,
3195    #[doc = "Focus automatically."]
3196    FOCUS_TYPE_AUTO = 4,
3197    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
3198    FOCUS_TYPE_AUTO_SINGLE = 5,
3199    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
3200    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
3201}
3202impl SetFocusType {
3203    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
3204}
3205impl Default for SetFocusType {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3212#[cfg_attr(feature = "serde", serde(tag = "type"))]
3213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3214#[repr(u32)]
3215#[doc = "Cellular network radio type"]
3216pub enum CellularNetworkRadioType {
3217    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
3218    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
3219    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
3220    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
3221    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
3222}
3223impl CellularNetworkRadioType {
3224    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
3225}
3226impl Default for CellularNetworkRadioType {
3227    fn default() -> Self {
3228        Self::DEFAULT
3229    }
3230}
3231#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3233#[cfg_attr(feature = "serde", serde(tag = "type"))]
3234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3235#[repr(u32)]
3236#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
3237pub enum FirmwareVersionType {
3238    #[doc = "development release"]
3239    FIRMWARE_VERSION_TYPE_DEV = 0,
3240    #[doc = "alpha release"]
3241    FIRMWARE_VERSION_TYPE_ALPHA = 64,
3242    #[doc = "beta release"]
3243    FIRMWARE_VERSION_TYPE_BETA = 128,
3244    #[doc = "release candidate"]
3245    FIRMWARE_VERSION_TYPE_RC = 192,
3246    #[doc = "official stable release"]
3247    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
3248}
3249impl FirmwareVersionType {
3250    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
3251}
3252impl Default for FirmwareVersionType {
3253    fn default() -> Self {
3254        Self::DEFAULT
3255    }
3256}
3257bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
3258impl MavBatteryFault {
3259    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
3260}
3261impl Default for MavBatteryFault {
3262    fn default() -> Self {
3263        Self::DEFAULT
3264    }
3265}
3266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3268#[cfg_attr(feature = "serde", serde(tag = "type"))]
3269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3270#[repr(u32)]
3271pub enum MavOdidArmStatus {
3272    #[doc = "Passing arming checks."]
3273    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
3274    #[doc = "Generic arming failure, see error string for details."]
3275    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
3276}
3277impl MavOdidArmStatus {
3278    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
3279}
3280impl Default for MavOdidArmStatus {
3281    fn default() -> Self {
3282        Self::DEFAULT
3283    }
3284}
3285#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3287#[cfg_attr(feature = "serde", serde(tag = "type"))]
3288#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3289#[repr(u32)]
3290#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3291pub enum RtkBaselineCoordinateSystem {
3292    #[doc = "Earth-centered, Earth-fixed"]
3293    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3294    #[doc = "RTK basestation centered, north, east, down"]
3295    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3296}
3297impl RtkBaselineCoordinateSystem {
3298    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3299}
3300impl Default for RtkBaselineCoordinateSystem {
3301    fn default() -> Self {
3302        Self::DEFAULT
3303    }
3304}
3305#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3307#[cfg_attr(feature = "serde", serde(tag = "type"))]
3308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3309#[repr(u32)]
3310#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
3311pub enum CameraSource {
3312    #[doc = "Default camera source."]
3313    CAMERA_SOURCE_DEFAULT = 0,
3314    #[doc = "RGB camera source."]
3315    CAMERA_SOURCE_RGB = 1,
3316    #[doc = "IR camera source."]
3317    CAMERA_SOURCE_IR = 2,
3318    #[doc = "NDVI camera source."]
3319    CAMERA_SOURCE_NDVI = 3,
3320}
3321impl CameraSource {
3322    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
3323}
3324impl Default for CameraSource {
3325    fn default() -> Self {
3326        Self::DEFAULT
3327    }
3328}
3329#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3331#[cfg_attr(feature = "serde", serde(tag = "type"))]
3332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3333#[repr(u32)]
3334#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
3335pub enum AisType {
3336    #[doc = "Not available (default)."]
3337    AIS_TYPE_UNKNOWN = 0,
3338    AIS_TYPE_RESERVED_1 = 1,
3339    AIS_TYPE_RESERVED_2 = 2,
3340    AIS_TYPE_RESERVED_3 = 3,
3341    AIS_TYPE_RESERVED_4 = 4,
3342    AIS_TYPE_RESERVED_5 = 5,
3343    AIS_TYPE_RESERVED_6 = 6,
3344    AIS_TYPE_RESERVED_7 = 7,
3345    AIS_TYPE_RESERVED_8 = 8,
3346    AIS_TYPE_RESERVED_9 = 9,
3347    AIS_TYPE_RESERVED_10 = 10,
3348    AIS_TYPE_RESERVED_11 = 11,
3349    AIS_TYPE_RESERVED_12 = 12,
3350    AIS_TYPE_RESERVED_13 = 13,
3351    AIS_TYPE_RESERVED_14 = 14,
3352    AIS_TYPE_RESERVED_15 = 15,
3353    AIS_TYPE_RESERVED_16 = 16,
3354    AIS_TYPE_RESERVED_17 = 17,
3355    AIS_TYPE_RESERVED_18 = 18,
3356    AIS_TYPE_RESERVED_19 = 19,
3357    #[doc = "Wing In Ground effect."]
3358    AIS_TYPE_WIG = 20,
3359    AIS_TYPE_WIG_HAZARDOUS_A = 21,
3360    AIS_TYPE_WIG_HAZARDOUS_B = 22,
3361    AIS_TYPE_WIG_HAZARDOUS_C = 23,
3362    AIS_TYPE_WIG_HAZARDOUS_D = 24,
3363    AIS_TYPE_WIG_RESERVED_1 = 25,
3364    AIS_TYPE_WIG_RESERVED_2 = 26,
3365    AIS_TYPE_WIG_RESERVED_3 = 27,
3366    AIS_TYPE_WIG_RESERVED_4 = 28,
3367    AIS_TYPE_WIG_RESERVED_5 = 29,
3368    AIS_TYPE_FISHING = 30,
3369    AIS_TYPE_TOWING = 31,
3370    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
3371    AIS_TYPE_TOWING_LARGE = 32,
3372    #[doc = "Dredging or other underwater ops."]
3373    AIS_TYPE_DREDGING = 33,
3374    AIS_TYPE_DIVING = 34,
3375    AIS_TYPE_MILITARY = 35,
3376    AIS_TYPE_SAILING = 36,
3377    AIS_TYPE_PLEASURE = 37,
3378    AIS_TYPE_RESERVED_20 = 38,
3379    AIS_TYPE_RESERVED_21 = 39,
3380    #[doc = "High Speed Craft."]
3381    AIS_TYPE_HSC = 40,
3382    AIS_TYPE_HSC_HAZARDOUS_A = 41,
3383    AIS_TYPE_HSC_HAZARDOUS_B = 42,
3384    AIS_TYPE_HSC_HAZARDOUS_C = 43,
3385    AIS_TYPE_HSC_HAZARDOUS_D = 44,
3386    AIS_TYPE_HSC_RESERVED_1 = 45,
3387    AIS_TYPE_HSC_RESERVED_2 = 46,
3388    AIS_TYPE_HSC_RESERVED_3 = 47,
3389    AIS_TYPE_HSC_RESERVED_4 = 48,
3390    AIS_TYPE_HSC_UNKNOWN = 49,
3391    AIS_TYPE_PILOT = 50,
3392    #[doc = "Search And Rescue vessel."]
3393    AIS_TYPE_SAR = 51,
3394    AIS_TYPE_TUG = 52,
3395    AIS_TYPE_PORT_TENDER = 53,
3396    #[doc = "Anti-pollution equipment."]
3397    AIS_TYPE_ANTI_POLLUTION = 54,
3398    AIS_TYPE_LAW_ENFORCEMENT = 55,
3399    AIS_TYPE_SPARE_LOCAL_1 = 56,
3400    AIS_TYPE_SPARE_LOCAL_2 = 57,
3401    AIS_TYPE_MEDICAL_TRANSPORT = 58,
3402    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
3403    AIS_TYPE_NONECOMBATANT = 59,
3404    AIS_TYPE_PASSENGER = 60,
3405    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
3406    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
3407    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
3408    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
3409    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
3410    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
3411    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
3412    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
3413    AIS_TYPE_PASSENGER_UNKNOWN = 69,
3414    AIS_TYPE_CARGO = 70,
3415    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
3416    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
3417    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
3418    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
3419    AIS_TYPE_CARGO_RESERVED_1 = 75,
3420    AIS_TYPE_CARGO_RESERVED_2 = 76,
3421    AIS_TYPE_CARGO_RESERVED_3 = 77,
3422    AIS_TYPE_CARGO_RESERVED_4 = 78,
3423    AIS_TYPE_CARGO_UNKNOWN = 79,
3424    AIS_TYPE_TANKER = 80,
3425    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
3426    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
3427    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
3428    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
3429    AIS_TYPE_TANKER_RESERVED_1 = 85,
3430    AIS_TYPE_TANKER_RESERVED_2 = 86,
3431    AIS_TYPE_TANKER_RESERVED_3 = 87,
3432    AIS_TYPE_TANKER_RESERVED_4 = 88,
3433    AIS_TYPE_TANKER_UNKNOWN = 89,
3434    AIS_TYPE_OTHER = 90,
3435    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
3436    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
3437    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
3438    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
3439    AIS_TYPE_OTHER_RESERVED_1 = 95,
3440    AIS_TYPE_OTHER_RESERVED_2 = 96,
3441    AIS_TYPE_OTHER_RESERVED_3 = 97,
3442    AIS_TYPE_OTHER_RESERVED_4 = 98,
3443    AIS_TYPE_OTHER_UNKNOWN = 99,
3444}
3445impl AisType {
3446    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
3447}
3448impl Default for AisType {
3449    fn default() -> Self {
3450        Self::DEFAULT
3451    }
3452}
3453#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3454#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3455#[cfg_attr(feature = "serde", serde(tag = "type"))]
3456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3457#[repr(u32)]
3458#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
3459pub enum AisNavStatus {
3460    #[doc = "Under way using engine."]
3461    UNDER_WAY = 0,
3462    AIS_NAV_ANCHORED = 1,
3463    AIS_NAV_UN_COMMANDED = 2,
3464    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
3465    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
3466    AIS_NAV_MOORED = 5,
3467    AIS_NAV_AGROUND = 6,
3468    AIS_NAV_FISHING = 7,
3469    AIS_NAV_SAILING = 8,
3470    AIS_NAV_RESERVED_HSC = 9,
3471    AIS_NAV_RESERVED_WIG = 10,
3472    AIS_NAV_RESERVED_1 = 11,
3473    AIS_NAV_RESERVED_2 = 12,
3474    AIS_NAV_RESERVED_3 = 13,
3475    #[doc = "Search And Rescue Transponder."]
3476    AIS_NAV_AIS_SART = 14,
3477    #[doc = "Not available (default)."]
3478    AIS_NAV_UNKNOWN = 15,
3479}
3480impl AisNavStatus {
3481    pub const DEFAULT: Self = Self::UNDER_WAY;
3482}
3483impl Default for AisNavStatus {
3484    fn default() -> Self {
3485        Self::DEFAULT
3486    }
3487}
3488bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
3489impl GimbalDeviceErrorFlags {
3490    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
3491}
3492impl Default for GimbalDeviceErrorFlags {
3493    fn default() -> Self {
3494        Self::DEFAULT
3495    }
3496}
3497bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
3498impl SerialControlFlag {
3499    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
3500}
3501impl Default for SerialControlFlag {
3502    fn default() -> Self {
3503        Self::DEFAULT
3504    }
3505}
3506bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
3507impl VideoStreamStatusFlags {
3508    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
3509}
3510impl Default for VideoStreamStatusFlags {
3511    fn default() -> Self {
3512        Self::DEFAULT
3513    }
3514}
3515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3517#[cfg_attr(feature = "serde", serde(tag = "type"))]
3518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3519#[repr(u32)]
3520#[doc = "SERIAL_CONTROL device types"]
3521pub enum SerialControlDev {
3522    #[doc = "First telemetry port"]
3523    SERIAL_CONTROL_DEV_TELEM1 = 0,
3524    #[doc = "Second telemetry port"]
3525    SERIAL_CONTROL_DEV_TELEM2 = 1,
3526    #[doc = "First GPS port"]
3527    SERIAL_CONTROL_DEV_GPS1 = 2,
3528    #[doc = "Second GPS port"]
3529    SERIAL_CONTROL_DEV_GPS2 = 3,
3530    #[doc = "system shell"]
3531    SERIAL_CONTROL_DEV_SHELL = 10,
3532    #[doc = "SERIAL0"]
3533    SERIAL_CONTROL_SERIAL0 = 100,
3534    #[doc = "SERIAL1"]
3535    SERIAL_CONTROL_SERIAL1 = 101,
3536    #[doc = "SERIAL2"]
3537    SERIAL_CONTROL_SERIAL2 = 102,
3538    #[doc = "SERIAL3"]
3539    SERIAL_CONTROL_SERIAL3 = 103,
3540    #[doc = "SERIAL4"]
3541    SERIAL_CONTROL_SERIAL4 = 104,
3542    #[doc = "SERIAL5"]
3543    SERIAL_CONTROL_SERIAL5 = 105,
3544    #[doc = "SERIAL6"]
3545    SERIAL_CONTROL_SERIAL6 = 106,
3546    #[doc = "SERIAL7"]
3547    SERIAL_CONTROL_SERIAL7 = 107,
3548    #[doc = "SERIAL8"]
3549    SERIAL_CONTROL_SERIAL8 = 108,
3550    #[doc = "SERIAL9"]
3551    SERIAL_CONTROL_SERIAL9 = 109,
3552}
3553impl SerialControlDev {
3554    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
3555}
3556impl Default for SerialControlDev {
3557    fn default() -> Self {
3558        Self::DEFAULT
3559    }
3560}
3561#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3563#[cfg_attr(feature = "serde", serde(tag = "type"))]
3564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3565#[repr(u32)]
3566#[doc = "Navigation filter mode"]
3567pub enum UalbertaNavMode {
3568    NAV_AHRS_INIT = 1,
3569    #[doc = "AHRS mode"]
3570    NAV_AHRS = 2,
3571    #[doc = "INS/GPS initialization mode"]
3572    NAV_INS_GPS_INIT = 3,
3573    #[doc = "INS/GPS mode"]
3574    NAV_INS_GPS = 4,
3575}
3576impl UalbertaNavMode {
3577    pub const DEFAULT: Self = Self::NAV_AHRS_INIT;
3578}
3579impl Default for UalbertaNavMode {
3580    fn default() -> Self {
3581        Self::DEFAULT
3582    }
3583}
3584bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3585impl MavProtocolCapability {
3586    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3587}
3588impl Default for MavProtocolCapability {
3589    fn default() -> Self {
3590        Self::DEFAULT
3591    }
3592}
3593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3595#[cfg_attr(feature = "serde", serde(tag = "type"))]
3596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3597#[repr(u32)]
3598#[doc = "Flags to indicate the type of storage."]
3599pub enum StorageType {
3600    #[doc = "Storage type is not known."]
3601    STORAGE_TYPE_UNKNOWN = 0,
3602    #[doc = "Storage type is USB device."]
3603    STORAGE_TYPE_USB_STICK = 1,
3604    #[doc = "Storage type is SD card."]
3605    STORAGE_TYPE_SD = 2,
3606    #[doc = "Storage type is microSD card."]
3607    STORAGE_TYPE_MICROSD = 3,
3608    #[doc = "Storage type is CFast."]
3609    STORAGE_TYPE_CF = 4,
3610    #[doc = "Storage type is CFexpress."]
3611    STORAGE_TYPE_CFE = 5,
3612    #[doc = "Storage type is XQD."]
3613    STORAGE_TYPE_XQD = 6,
3614    #[doc = "Storage type is HD mass storage type."]
3615    STORAGE_TYPE_HD = 7,
3616    #[doc = "Storage type is other, not listed type."]
3617    STORAGE_TYPE_OTHER = 254,
3618}
3619impl StorageType {
3620    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
3621}
3622impl Default for StorageType {
3623    fn default() -> Self {
3624        Self::DEFAULT
3625    }
3626}
3627bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
3628impl GimbalManagerCapFlags {
3629    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
3630}
3631impl Default for GimbalManagerCapFlags {
3632    fn default() -> Self {
3633        Self::DEFAULT
3634    }
3635}
3636#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3638#[cfg_attr(feature = "serde", serde(tag = "type"))]
3639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3640#[repr(u32)]
3641#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
3642pub enum SpeedType {
3643    #[doc = "Airspeed"]
3644    SPEED_TYPE_AIRSPEED = 0,
3645    #[doc = "Groundspeed"]
3646    SPEED_TYPE_GROUNDSPEED = 1,
3647    #[doc = "Climb speed"]
3648    SPEED_TYPE_CLIMB_SPEED = 2,
3649    #[doc = "Descent speed"]
3650    SPEED_TYPE_DESCENT_SPEED = 3,
3651}
3652impl SpeedType {
3653    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
3654}
3655impl Default for SpeedType {
3656    fn default() -> Self {
3657        Self::DEFAULT
3658    }
3659}
3660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3662#[cfg_attr(feature = "serde", serde(tag = "type"))]
3663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3664#[repr(u32)]
3665#[doc = "Enumeration of battery functions"]
3666pub enum MavBatteryFunction {
3667    #[doc = "Battery function is unknown"]
3668    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
3669    #[doc = "Battery supports all flight systems"]
3670    MAV_BATTERY_FUNCTION_ALL = 1,
3671    #[doc = "Battery for the propulsion system"]
3672    MAV_BATTERY_FUNCTION_PROPULSION = 2,
3673    #[doc = "Avionics battery"]
3674    MAV_BATTERY_FUNCTION_AVIONICS = 3,
3675    #[doc = "Payload battery"]
3676    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
3677}
3678impl MavBatteryFunction {
3679    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
3680}
3681impl Default for MavBatteryFunction {
3682    fn default() -> Self {
3683        Self::DEFAULT
3684    }
3685}
3686#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3688#[cfg_attr(feature = "serde", serde(tag = "type"))]
3689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3690#[repr(u32)]
3691pub enum MavOdidTimeAcc {
3692    #[doc = "The timestamp accuracy is unknown."]
3693    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3694    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3695    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3696    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3697    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3698    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3699    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3700    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3701    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3702    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3703    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3704    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3705    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3706    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3707    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3708    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3709    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3710    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3711    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3712    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3713    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3714    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3715    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3716    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3717    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3718    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3719    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3720    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3721    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3722    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3723    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3724}
3725impl MavOdidTimeAcc {
3726    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3727}
3728impl Default for MavOdidTimeAcc {
3729    fn default() -> Self {
3730        Self::DEFAULT
3731    }
3732}
3733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3735#[cfg_attr(feature = "serde", serde(tag = "type"))]
3736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3737#[repr(u32)]
3738#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3739pub enum MavType {
3740    #[doc = "Generic micro air vehicle"]
3741    MAV_TYPE_GENERIC = 0,
3742    #[doc = "Fixed wing aircraft."]
3743    MAV_TYPE_FIXED_WING = 1,
3744    #[doc = "Quadrotor"]
3745    MAV_TYPE_QUADROTOR = 2,
3746    #[doc = "Coaxial helicopter"]
3747    MAV_TYPE_COAXIAL = 3,
3748    #[doc = "Normal helicopter with tail rotor."]
3749    MAV_TYPE_HELICOPTER = 4,
3750    #[doc = "Ground installation"]
3751    MAV_TYPE_ANTENNA_TRACKER = 5,
3752    #[doc = "Operator control unit / ground control station"]
3753    MAV_TYPE_GCS = 6,
3754    #[doc = "Airship, controlled"]
3755    MAV_TYPE_AIRSHIP = 7,
3756    #[doc = "Free balloon, uncontrolled"]
3757    MAV_TYPE_FREE_BALLOON = 8,
3758    #[doc = "Rocket"]
3759    MAV_TYPE_ROCKET = 9,
3760    #[doc = "Ground rover"]
3761    MAV_TYPE_GROUND_ROVER = 10,
3762    #[doc = "Surface vessel, boat, ship"]
3763    MAV_TYPE_SURFACE_BOAT = 11,
3764    #[doc = "Submarine"]
3765    MAV_TYPE_SUBMARINE = 12,
3766    #[doc = "Hexarotor"]
3767    MAV_TYPE_HEXAROTOR = 13,
3768    #[doc = "Octorotor"]
3769    MAV_TYPE_OCTOROTOR = 14,
3770    #[doc = "Tricopter"]
3771    MAV_TYPE_TRICOPTER = 15,
3772    #[doc = "Flapping wing"]
3773    MAV_TYPE_FLAPPING_WING = 16,
3774    #[doc = "Kite"]
3775    MAV_TYPE_KITE = 17,
3776    #[doc = "Onboard companion controller"]
3777    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3778    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3779    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3780    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3781    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3782    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3783    MAV_TYPE_VTOL_TILTROTOR = 21,
3784    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3785    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3786    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3787    MAV_TYPE_VTOL_TAILSITTER = 23,
3788    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3789    MAV_TYPE_VTOL_TILTWING = 24,
3790    #[doc = "VTOL reserved 5"]
3791    MAV_TYPE_VTOL_RESERVED5 = 25,
3792    #[doc = "Gimbal"]
3793    MAV_TYPE_GIMBAL = 26,
3794    #[doc = "ADSB system"]
3795    MAV_TYPE_ADSB = 27,
3796    #[doc = "Steerable, nonrigid airfoil"]
3797    MAV_TYPE_PARAFOIL = 28,
3798    #[doc = "Dodecarotor"]
3799    MAV_TYPE_DODECAROTOR = 29,
3800    #[doc = "Camera"]
3801    MAV_TYPE_CAMERA = 30,
3802    #[doc = "Charging station"]
3803    MAV_TYPE_CHARGING_STATION = 31,
3804    #[doc = "FLARM collision avoidance system"]
3805    MAV_TYPE_FLARM = 32,
3806    #[doc = "Servo"]
3807    MAV_TYPE_SERVO = 33,
3808    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3809    MAV_TYPE_ODID = 34,
3810    #[doc = "Decarotor"]
3811    MAV_TYPE_DECAROTOR = 35,
3812    #[doc = "Battery"]
3813    MAV_TYPE_BATTERY = 36,
3814    #[doc = "Parachute"]
3815    MAV_TYPE_PARACHUTE = 37,
3816    #[doc = "Log"]
3817    MAV_TYPE_LOG = 38,
3818    #[doc = "OSD"]
3819    MAV_TYPE_OSD = 39,
3820    #[doc = "IMU"]
3821    MAV_TYPE_IMU = 40,
3822    #[doc = "GPS"]
3823    MAV_TYPE_GPS = 41,
3824    #[doc = "Winch"]
3825    MAV_TYPE_WINCH = 42,
3826    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3827    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3828    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3829    MAV_TYPE_ILLUMINATOR = 44,
3830    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3831    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3832}
3833impl MavType {
3834    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3835}
3836impl Default for MavType {
3837    fn default() -> Self {
3838        Self::DEFAULT
3839    }
3840}
3841#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3843#[cfg_attr(feature = "serde", serde(tag = "type"))]
3844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3845#[repr(u32)]
3846#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
3847pub enum MavMountMode {
3848    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
3849    MAV_MOUNT_MODE_RETRACT = 0,
3850    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
3851    MAV_MOUNT_MODE_NEUTRAL = 1,
3852    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
3853    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
3854    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
3855    MAV_MOUNT_MODE_RC_TARGETING = 3,
3856    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
3857    MAV_MOUNT_MODE_GPS_POINT = 4,
3858    #[doc = "Gimbal tracks system with specified system ID"]
3859    MAV_MOUNT_MODE_SYSID_TARGET = 5,
3860    #[doc = "Gimbal tracks home position"]
3861    MAV_MOUNT_MODE_HOME_LOCATION = 6,
3862}
3863impl MavMountMode {
3864    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
3865}
3866impl Default for MavMountMode {
3867    fn default() -> Self {
3868        Self::DEFAULT
3869    }
3870}
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Specifies the datatype of a MAVLink parameter."]
3877pub enum MavParamType {
3878    #[doc = "8-bit unsigned integer"]
3879    MAV_PARAM_TYPE_UINT8 = 1,
3880    #[doc = "8-bit signed integer"]
3881    MAV_PARAM_TYPE_INT8 = 2,
3882    #[doc = "16-bit unsigned integer"]
3883    MAV_PARAM_TYPE_UINT16 = 3,
3884    #[doc = "16-bit signed integer"]
3885    MAV_PARAM_TYPE_INT16 = 4,
3886    #[doc = "32-bit unsigned integer"]
3887    MAV_PARAM_TYPE_UINT32 = 5,
3888    #[doc = "32-bit signed integer"]
3889    MAV_PARAM_TYPE_INT32 = 6,
3890    #[doc = "64-bit unsigned integer"]
3891    MAV_PARAM_TYPE_UINT64 = 7,
3892    #[doc = "64-bit signed integer"]
3893    MAV_PARAM_TYPE_INT64 = 8,
3894    #[doc = "32-bit floating-point"]
3895    MAV_PARAM_TYPE_REAL32 = 9,
3896    #[doc = "64-bit floating-point"]
3897    MAV_PARAM_TYPE_REAL64 = 10,
3898}
3899impl MavParamType {
3900    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3901}
3902impl Default for MavParamType {
3903    fn default() -> Self {
3904        Self::DEFAULT
3905    }
3906}
3907#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3909#[cfg_attr(feature = "serde", serde(tag = "type"))]
3910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3911#[repr(u32)]
3912#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3913pub enum MavStandardMode {
3914    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3915    MAV_STANDARD_MODE_NON_STANDARD = 0,
3916    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3917    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3918    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3919    MAV_STANDARD_MODE_ORBIT = 2,
3920    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3921    MAV_STANDARD_MODE_CRUISE = 3,
3922    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3923    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3924    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3925    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3926    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3927    MAV_STANDARD_MODE_MISSION = 6,
3928    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3929    MAV_STANDARD_MODE_LAND = 7,
3930    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3931    MAV_STANDARD_MODE_TAKEOFF = 8,
3932}
3933impl MavStandardMode {
3934    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3935}
3936impl Default for MavStandardMode {
3937    fn default() -> Self {
3938        Self::DEFAULT
3939    }
3940}
3941bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
3942impl MavModeProperty {
3943    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
3944}
3945impl Default for MavModeProperty {
3946    fn default() -> Self {
3947        Self::DEFAULT
3948    }
3949}
3950bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
3951impl UtmDataAvailFlags {
3952    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
3953}
3954impl Default for UtmDataAvailFlags {
3955    fn default() -> Self {
3956        Self::DEFAULT
3957    }
3958}
3959#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3960#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3961#[cfg_attr(feature = "serde", serde(tag = "type"))]
3962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3963#[repr(u32)]
3964#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3965pub enum PreflightStorageMissionAction {
3966    #[doc = "Read current mission data from persistent storage"]
3967    MISSION_READ_PERSISTENT = 0,
3968    #[doc = "Write current mission data to persistent storage"]
3969    MISSION_WRITE_PERSISTENT = 1,
3970    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3971    MISSION_RESET_DEFAULT = 2,
3972}
3973impl PreflightStorageMissionAction {
3974    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3975}
3976impl Default for PreflightStorageMissionAction {
3977    fn default() -> Self {
3978        Self::DEFAULT
3979    }
3980}
3981#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3983#[cfg_attr(feature = "serde", serde(tag = "type"))]
3984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3985#[repr(u32)]
3986#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
3987pub enum MavFtpErr {
3988    #[doc = "None: No error"]
3989    MAV_FTP_ERR_NONE = 0,
3990    #[doc = "Fail: Unknown failure"]
3991    MAV_FTP_ERR_FAIL = 1,
3992    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
3993    MAV_FTP_ERR_FAILERRNO = 2,
3994    #[doc = "InvalidDataSize: Payload size is invalid"]
3995    MAV_FTP_ERR_INVALIDDATASIZE = 3,
3996    #[doc = "InvalidSession: Session is not currently open"]
3997    MAV_FTP_ERR_INVALIDSESSION = 4,
3998    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
3999    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
4000    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
4001    MAV_FTP_ERR_EOF = 6,
4002    #[doc = "UnknownCommand: Unknown command / opcode"]
4003    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
4004    #[doc = "FileExists: File/directory already exists"]
4005    MAV_FTP_ERR_FILEEXISTS = 8,
4006    #[doc = "FileProtected: File/directory is write protected"]
4007    MAV_FTP_ERR_FILEPROTECTED = 9,
4008    #[doc = "FileNotFound: File/directory not found"]
4009    MAV_FTP_ERR_FILENOTFOUND = 10,
4010}
4011impl MavFtpErr {
4012    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
4013}
4014impl Default for MavFtpErr {
4015    fn default() -> Self {
4016        Self::DEFAULT
4017    }
4018}
4019#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4021#[cfg_attr(feature = "serde", serde(tag = "type"))]
4022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4023#[repr(u32)]
4024pub enum MavOdidOperatorIdType {
4025    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
4026    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
4027}
4028impl MavOdidOperatorIdType {
4029    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
4030}
4031impl Default for MavOdidOperatorIdType {
4032    fn default() -> Self {
4033        Self::DEFAULT
4034    }
4035}
4036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4038#[cfg_attr(feature = "serde", serde(tag = "type"))]
4039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4040#[repr(u32)]
4041#[doc = "Indicates the ESC connection type."]
4042pub enum EscConnectionType {
4043    #[doc = "Traditional PPM ESC."]
4044    ESC_CONNECTION_TYPE_PPM = 0,
4045    #[doc = "Serial Bus connected ESC."]
4046    ESC_CONNECTION_TYPE_SERIAL = 1,
4047    #[doc = "One Shot PPM ESC."]
4048    ESC_CONNECTION_TYPE_ONESHOT = 2,
4049    #[doc = "I2C ESC."]
4050    ESC_CONNECTION_TYPE_I2C = 3,
4051    #[doc = "CAN-Bus ESC."]
4052    ESC_CONNECTION_TYPE_CAN = 4,
4053    #[doc = "DShot ESC."]
4054    ESC_CONNECTION_TYPE_DSHOT = 5,
4055}
4056impl EscConnectionType {
4057    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
4058}
4059impl Default for EscConnectionType {
4060    fn default() -> Self {
4061        Self::DEFAULT
4062    }
4063}
4064#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4066#[cfg_attr(feature = "serde", serde(tag = "type"))]
4067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4068#[repr(u32)]
4069#[doc = "Enumeration of distance sensor types"]
4070pub enum MavDistanceSensor {
4071    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
4072    MAV_DISTANCE_SENSOR_LASER = 0,
4073    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
4074    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
4075    #[doc = "Infrared rangefinder, e.g. Sharp units"]
4076    MAV_DISTANCE_SENSOR_INFRARED = 2,
4077    #[doc = "Radar type, e.g. uLanding units"]
4078    MAV_DISTANCE_SENSOR_RADAR = 3,
4079    #[doc = "Broken or unknown type, e.g. analog units"]
4080    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
4081}
4082impl MavDistanceSensor {
4083    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
4084}
4085impl Default for MavDistanceSensor {
4086    fn default() -> Self {
4087        Self::DEFAULT
4088    }
4089}
4090#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4092#[cfg_attr(feature = "serde", serde(tag = "type"))]
4093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4094#[repr(u32)]
4095#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
4096pub enum AdsbEmitterType {
4097    ADSB_EMITTER_TYPE_NO_INFO = 0,
4098    ADSB_EMITTER_TYPE_LIGHT = 1,
4099    ADSB_EMITTER_TYPE_SMALL = 2,
4100    ADSB_EMITTER_TYPE_LARGE = 3,
4101    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
4102    ADSB_EMITTER_TYPE_HEAVY = 5,
4103    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
4104    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
4105    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
4106    ADSB_EMITTER_TYPE_GLIDER = 9,
4107    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
4108    ADSB_EMITTER_TYPE_PARACHUTE = 11,
4109    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
4110    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
4111    ADSB_EMITTER_TYPE_UAV = 14,
4112    ADSB_EMITTER_TYPE_SPACE = 15,
4113    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
4114    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
4115    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
4116    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
4117}
4118impl AdsbEmitterType {
4119    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
4120}
4121impl Default for AdsbEmitterType {
4122    fn default() -> Self {
4123        Self::DEFAULT
4124    }
4125}
4126#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4128#[cfg_attr(feature = "serde", serde(tag = "type"))]
4129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4130#[repr(u32)]
4131#[doc = "Actions being taken to mitigate/prevent fence breach"]
4132pub enum FenceMitigate {
4133    #[doc = "Unknown"]
4134    FENCE_MITIGATE_UNKNOWN = 0,
4135    #[doc = "No actions being taken"]
4136    FENCE_MITIGATE_NONE = 1,
4137    #[doc = "Velocity limiting active to prevent breach"]
4138    FENCE_MITIGATE_VEL_LIMIT = 2,
4139}
4140impl FenceMitigate {
4141    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
4142}
4143impl Default for FenceMitigate {
4144    fn default() -> Self {
4145        Self::DEFAULT
4146    }
4147}
4148#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4150#[cfg_attr(feature = "serde", serde(tag = "type"))]
4151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4152#[repr(u32)]
4153#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4154pub enum PreflightStorageParameterAction {
4155    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4156    PARAM_READ_PERSISTENT = 0,
4157    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4158    PARAM_WRITE_PERSISTENT = 1,
4159    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4160    PARAM_RESET_CONFIG_DEFAULT = 2,
4161    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4162    PARAM_RESET_SENSOR_DEFAULT = 3,
4163    #[doc = "Reset all parameters, including operation counters, to default values"]
4164    PARAM_RESET_ALL_DEFAULT = 4,
4165}
4166impl PreflightStorageParameterAction {
4167    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4168}
4169impl Default for PreflightStorageParameterAction {
4170    fn default() -> Self {
4171        Self::DEFAULT
4172    }
4173}
4174#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4176#[cfg_attr(feature = "serde", serde(tag = "type"))]
4177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4178#[repr(u32)]
4179#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4180pub enum PrecisionLandMode {
4181    #[doc = "Normal (non-precision) landing."]
4182    PRECISION_LAND_MODE_DISABLED = 0,
4183    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4184    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4185    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4186    PRECISION_LAND_MODE_REQUIRED = 2,
4187}
4188impl PrecisionLandMode {
4189    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4190}
4191impl Default for PrecisionLandMode {
4192    fn default() -> Self {
4193        Self::DEFAULT
4194    }
4195}
4196#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4198#[cfg_attr(feature = "serde", serde(tag = "type"))]
4199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4200#[repr(u32)]
4201#[doc = "Winch actions."]
4202pub enum WinchActions {
4203    #[doc = "Allow motor to freewheel."]
4204    WINCH_RELAXED = 0,
4205    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4206    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4207    #[doc = "Wind or unwind line at specified rate."]
4208    WINCH_RATE_CONTROL = 2,
4209    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4210    WINCH_LOCK = 3,
4211    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4212    WINCH_DELIVER = 4,
4213    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4214    WINCH_HOLD = 5,
4215    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4216    WINCH_RETRACT = 6,
4217    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4218    WINCH_LOAD_LINE = 7,
4219    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4220    WINCH_ABANDON_LINE = 8,
4221    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4222    WINCH_LOAD_PAYLOAD = 9,
4223}
4224impl WinchActions {
4225    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4226}
4227impl Default for WinchActions {
4228    fn default() -> Self {
4229        Self::DEFAULT
4230    }
4231}
4232#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4234#[cfg_attr(feature = "serde", serde(tag = "type"))]
4235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4236#[repr(u32)]
4237#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
4238pub enum MavFuelType {
4239    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
4240    MAV_FUEL_TYPE_UNKNOWN = 0,
4241    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
4242    MAV_FUEL_TYPE_LIQUID = 1,
4243    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
4244    MAV_FUEL_TYPE_GAS = 2,
4245}
4246impl MavFuelType {
4247    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
4248}
4249impl Default for MavFuelType {
4250    fn default() -> Self {
4251        Self::DEFAULT
4252    }
4253}
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Mode currently commanded by pilot"]
4260pub enum UalbertaPilotMode {
4261    PILOT_MANUAL = 1,
4262    PILOT_AUTO = 2,
4263    #[doc = "Rotomotion mode"]
4264    PILOT_ROTO = 3,
4265}
4266impl UalbertaPilotMode {
4267    pub const DEFAULT: Self = Self::PILOT_MANUAL;
4268}
4269impl Default for UalbertaPilotMode {
4270    fn default() -> Self {
4271        Self::DEFAULT
4272    }
4273}
4274#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4276#[cfg_attr(feature = "serde", serde(tag = "type"))]
4277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4278#[repr(u32)]
4279#[doc = "Camera tracking status flags"]
4280pub enum CameraTrackingStatusFlags {
4281    #[doc = "Camera is not tracking"]
4282    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
4283    #[doc = "Camera is tracking"]
4284    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
4285    #[doc = "Camera tracking in error state"]
4286    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
4287}
4288impl CameraTrackingStatusFlags {
4289    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
4290}
4291impl Default for CameraTrackingStatusFlags {
4292    fn default() -> Self {
4293        Self::DEFAULT
4294    }
4295}
4296#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4298#[cfg_attr(feature = "serde", serde(tag = "type"))]
4299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4300#[repr(u32)]
4301#[doc = "Type of GPS fix"]
4302pub enum GpsFixType {
4303    #[doc = "No GPS connected"]
4304    GPS_FIX_TYPE_NO_GPS = 0,
4305    #[doc = "No position information, GPS is connected"]
4306    GPS_FIX_TYPE_NO_FIX = 1,
4307    #[doc = "2D position"]
4308    GPS_FIX_TYPE_2D_FIX = 2,
4309    #[doc = "3D position"]
4310    GPS_FIX_TYPE_3D_FIX = 3,
4311    #[doc = "DGPS/SBAS aided 3D position"]
4312    GPS_FIX_TYPE_DGPS = 4,
4313    #[doc = "RTK float, 3D position"]
4314    GPS_FIX_TYPE_RTK_FLOAT = 5,
4315    #[doc = "RTK Fixed, 3D position"]
4316    GPS_FIX_TYPE_RTK_FIXED = 6,
4317    #[doc = "Static fixed, typically used for base stations"]
4318    GPS_FIX_TYPE_STATIC = 7,
4319    #[doc = "PPP, 3D position."]
4320    GPS_FIX_TYPE_PPP = 8,
4321}
4322impl GpsFixType {
4323    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
4324}
4325impl Default for GpsFixType {
4326    fn default() -> Self {
4327        Self::DEFAULT
4328    }
4329}
4330#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4332#[cfg_attr(feature = "serde", serde(tag = "type"))]
4333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4334#[repr(u32)]
4335pub enum MavOdidHorAcc {
4336    #[doc = "The horizontal accuracy is unknown."]
4337    MAV_ODID_HOR_ACC_UNKNOWN = 0,
4338    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
4339    MAV_ODID_HOR_ACC_10NM = 1,
4340    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
4341    MAV_ODID_HOR_ACC_4NM = 2,
4342    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
4343    MAV_ODID_HOR_ACC_2NM = 3,
4344    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
4345    MAV_ODID_HOR_ACC_1NM = 4,
4346    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
4347    MAV_ODID_HOR_ACC_0_5NM = 5,
4348    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
4349    MAV_ODID_HOR_ACC_0_3NM = 6,
4350    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
4351    MAV_ODID_HOR_ACC_0_1NM = 7,
4352    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
4353    MAV_ODID_HOR_ACC_0_05NM = 8,
4354    #[doc = "The horizontal accuracy is smaller than 30 meter."]
4355    MAV_ODID_HOR_ACC_30_METER = 9,
4356    #[doc = "The horizontal accuracy is smaller than 10 meter."]
4357    MAV_ODID_HOR_ACC_10_METER = 10,
4358    #[doc = "The horizontal accuracy is smaller than 3 meter."]
4359    MAV_ODID_HOR_ACC_3_METER = 11,
4360    #[doc = "The horizontal accuracy is smaller than 1 meter."]
4361    MAV_ODID_HOR_ACC_1_METER = 12,
4362}
4363impl MavOdidHorAcc {
4364    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
4365}
4366impl Default for MavOdidHorAcc {
4367    fn default() -> Self {
4368        Self::DEFAULT
4369    }
4370}
4371bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
4372impl HighresImuUpdatedFlags {
4373    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
4374}
4375impl Default for HighresImuUpdatedFlags {
4376    fn default() -> Self {
4377        Self::DEFAULT
4378    }
4379}
4380#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4382#[cfg_attr(feature = "serde", serde(tag = "type"))]
4383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4384#[repr(u32)]
4385#[doc = "Possible safety switch states."]
4386pub enum SafetySwitchState {
4387    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4388    SAFETY_SWITCH_STATE_SAFE = 0,
4389    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4390    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4391}
4392impl SafetySwitchState {
4393    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4394}
4395impl Default for SafetySwitchState {
4396    fn default() -> Self {
4397        Self::DEFAULT
4398    }
4399}
4400bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
4401impl MavWinchStatusFlag {
4402    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
4403}
4404impl Default for MavWinchStatusFlag {
4405    fn default() -> Self {
4406        Self::DEFAULT
4407    }
4408}
4409#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4411#[cfg_attr(feature = "serde", serde(tag = "type"))]
4412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4413#[repr(u32)]
4414pub enum MavState {
4415    #[doc = "Uninitialized system, state is unknown."]
4416    MAV_STATE_UNINIT = 0,
4417    #[doc = "System is booting up."]
4418    MAV_STATE_BOOT = 1,
4419    #[doc = "System is calibrating and not flight-ready."]
4420    MAV_STATE_CALIBRATING = 2,
4421    #[doc = "System is grounded and on standby. It can be launched any time."]
4422    MAV_STATE_STANDBY = 3,
4423    #[doc = "System is active and might be already airborne. Motors are engaged."]
4424    MAV_STATE_ACTIVE = 4,
4425    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
4426    MAV_STATE_CRITICAL = 5,
4427    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
4428    MAV_STATE_EMERGENCY = 6,
4429    #[doc = "System just initialized its power-down sequence, will shut down now."]
4430    MAV_STATE_POWEROFF = 7,
4431    #[doc = "System is terminating itself (failsafe or commanded)."]
4432    MAV_STATE_FLIGHT_TERMINATION = 8,
4433}
4434impl MavState {
4435    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
4436}
4437impl Default for MavState {
4438    fn default() -> Self {
4439        Self::DEFAULT
4440    }
4441}
4442#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4444#[cfg_attr(feature = "serde", serde(tag = "type"))]
4445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4446#[repr(u32)]
4447#[doc = "Result from PARAM_EXT_SET message."]
4448pub enum ParamAck {
4449    #[doc = "Parameter value ACCEPTED and SET"]
4450    PARAM_ACK_ACCEPTED = 0,
4451    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4452    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4453    #[doc = "Parameter failed to set"]
4454    PARAM_ACK_FAILED = 2,
4455    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4456    PARAM_ACK_IN_PROGRESS = 3,
4457}
4458impl ParamAck {
4459    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4460}
4461impl Default for ParamAck {
4462    fn default() -> Self {
4463        Self::DEFAULT
4464    }
4465}
4466#[doc = "id: 77"]
4467#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
4468#[derive(Debug, Clone, PartialEq)]
4469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4471pub struct COMMAND_ACK_DATA {
4472    #[doc = "Command ID (of acknowledged command)."]
4473    pub command: MavCmd,
4474    #[doc = "Result of command."]
4475    pub result: MavResult,
4476    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
4477    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4478    pub progress: u8,
4479    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
4480    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4481    pub result_param2: i32,
4482    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
4483    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4484    pub target_system: u8,
4485    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
4486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
4487    pub target_component: u8,
4488}
4489impl COMMAND_ACK_DATA {
4490    pub const ENCODED_LEN: usize = 10usize;
4491    pub const DEFAULT: Self = Self {
4492        command: MavCmd::DEFAULT,
4493        result: MavResult::DEFAULT,
4494        progress: 0_u8,
4495        result_param2: 0_i32,
4496        target_system: 0_u8,
4497        target_component: 0_u8,
4498    };
4499    #[cfg(feature = "arbitrary")]
4500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4501        use arbitrary::{Arbitrary, Unstructured};
4502        let mut buf = [0u8; 1024];
4503        rng.fill_bytes(&mut buf);
4504        let mut unstructured = Unstructured::new(&buf);
4505        Self::arbitrary(&mut unstructured).unwrap_or_default()
4506    }
4507}
4508impl Default for COMMAND_ACK_DATA {
4509    fn default() -> Self {
4510        Self::DEFAULT.clone()
4511    }
4512}
4513impl MessageData for COMMAND_ACK_DATA {
4514    type Message = MavMessage;
4515    const ID: u32 = 77u32;
4516    const NAME: &'static str = "COMMAND_ACK";
4517    const EXTRA_CRC: u8 = 143u8;
4518    const ENCODED_LEN: usize = 10usize;
4519    fn deser(
4520        _version: MavlinkVersion,
4521        __input: &[u8],
4522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4523        let avail_len = __input.len();
4524        let mut payload_buf = [0; Self::ENCODED_LEN];
4525        let mut buf = if avail_len < Self::ENCODED_LEN {
4526            payload_buf[0..avail_len].copy_from_slice(__input);
4527            Bytes::new(&payload_buf)
4528        } else {
4529            Bytes::new(__input)
4530        };
4531        let mut __struct = Self::default();
4532        let tmp = buf.get_u16_le();
4533        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
4534            ::mavlink_core::error::ParserError::InvalidEnum {
4535                enum_type: "MavCmd",
4536                value: tmp as u32,
4537            },
4538        )?;
4539        let tmp = buf.get_u8();
4540        __struct.result =
4541            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4542                enum_type: "MavResult",
4543                value: tmp as u32,
4544            })?;
4545        __struct.progress = buf.get_u8();
4546        __struct.result_param2 = buf.get_i32_le();
4547        __struct.target_system = buf.get_u8();
4548        __struct.target_component = buf.get_u8();
4549        Ok(__struct)
4550    }
4551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4552        let mut __tmp = BytesMut::new(bytes);
4553        #[allow(clippy::absurd_extreme_comparisons)]
4554        #[allow(unused_comparisons)]
4555        if __tmp.remaining() < Self::ENCODED_LEN {
4556            panic!(
4557                "buffer is too small (need {} bytes, but got {})",
4558                Self::ENCODED_LEN,
4559                __tmp.remaining(),
4560            )
4561        }
4562        __tmp.put_u16_le(self.command as u16);
4563        __tmp.put_u8(self.result as u8);
4564        __tmp.put_u8(self.progress);
4565        __tmp.put_i32_le(self.result_param2);
4566        __tmp.put_u8(self.target_system);
4567        __tmp.put_u8(self.target_component);
4568        if matches!(version, MavlinkVersion::V2) {
4569            let len = __tmp.len();
4570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4571        } else {
4572            __tmp.len()
4573        }
4574    }
4575}
4576#[doc = "id: 64"]
4577#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
4578#[derive(Debug, Clone, PartialEq)]
4579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4581pub struct LOCAL_POSITION_NED_COV_DATA {
4582    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4583    pub time_usec: u64,
4584    #[doc = "X Position"]
4585    pub x: f32,
4586    #[doc = "Y Position"]
4587    pub y: f32,
4588    #[doc = "Z Position"]
4589    pub z: f32,
4590    #[doc = "X Speed"]
4591    pub vx: f32,
4592    #[doc = "Y Speed"]
4593    pub vy: f32,
4594    #[doc = "Z Speed"]
4595    pub vz: f32,
4596    #[doc = "X Acceleration"]
4597    pub ax: f32,
4598    #[doc = "Y Acceleration"]
4599    pub ay: f32,
4600    #[doc = "Z Acceleration"]
4601    pub az: f32,
4602    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
4603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4604    pub covariance: [f32; 45],
4605    #[doc = "Class id of the estimator this estimate originated from."]
4606    pub estimator_type: MavEstimatorType,
4607}
4608impl LOCAL_POSITION_NED_COV_DATA {
4609    pub const ENCODED_LEN: usize = 225usize;
4610    pub const DEFAULT: Self = Self {
4611        time_usec: 0_u64,
4612        x: 0.0_f32,
4613        y: 0.0_f32,
4614        z: 0.0_f32,
4615        vx: 0.0_f32,
4616        vy: 0.0_f32,
4617        vz: 0.0_f32,
4618        ax: 0.0_f32,
4619        ay: 0.0_f32,
4620        az: 0.0_f32,
4621        covariance: [0.0_f32; 45usize],
4622        estimator_type: MavEstimatorType::DEFAULT,
4623    };
4624    #[cfg(feature = "arbitrary")]
4625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4626        use arbitrary::{Arbitrary, Unstructured};
4627        let mut buf = [0u8; 1024];
4628        rng.fill_bytes(&mut buf);
4629        let mut unstructured = Unstructured::new(&buf);
4630        Self::arbitrary(&mut unstructured).unwrap_or_default()
4631    }
4632}
4633impl Default for LOCAL_POSITION_NED_COV_DATA {
4634    fn default() -> Self {
4635        Self::DEFAULT.clone()
4636    }
4637}
4638impl MessageData for LOCAL_POSITION_NED_COV_DATA {
4639    type Message = MavMessage;
4640    const ID: u32 = 64u32;
4641    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
4642    const EXTRA_CRC: u8 = 191u8;
4643    const ENCODED_LEN: usize = 225usize;
4644    fn deser(
4645        _version: MavlinkVersion,
4646        __input: &[u8],
4647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4648        let avail_len = __input.len();
4649        let mut payload_buf = [0; Self::ENCODED_LEN];
4650        let mut buf = if avail_len < Self::ENCODED_LEN {
4651            payload_buf[0..avail_len].copy_from_slice(__input);
4652            Bytes::new(&payload_buf)
4653        } else {
4654            Bytes::new(__input)
4655        };
4656        let mut __struct = Self::default();
4657        __struct.time_usec = buf.get_u64_le();
4658        __struct.x = buf.get_f32_le();
4659        __struct.y = buf.get_f32_le();
4660        __struct.z = buf.get_f32_le();
4661        __struct.vx = buf.get_f32_le();
4662        __struct.vy = buf.get_f32_le();
4663        __struct.vz = buf.get_f32_le();
4664        __struct.ax = buf.get_f32_le();
4665        __struct.ay = buf.get_f32_le();
4666        __struct.az = buf.get_f32_le();
4667        for v in &mut __struct.covariance {
4668            let val = buf.get_f32_le();
4669            *v = val;
4670        }
4671        let tmp = buf.get_u8();
4672        __struct.estimator_type =
4673            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4674                enum_type: "MavEstimatorType",
4675                value: tmp as u32,
4676            })?;
4677        Ok(__struct)
4678    }
4679    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4680        let mut __tmp = BytesMut::new(bytes);
4681        #[allow(clippy::absurd_extreme_comparisons)]
4682        #[allow(unused_comparisons)]
4683        if __tmp.remaining() < Self::ENCODED_LEN {
4684            panic!(
4685                "buffer is too small (need {} bytes, but got {})",
4686                Self::ENCODED_LEN,
4687                __tmp.remaining(),
4688            )
4689        }
4690        __tmp.put_u64_le(self.time_usec);
4691        __tmp.put_f32_le(self.x);
4692        __tmp.put_f32_le(self.y);
4693        __tmp.put_f32_le(self.z);
4694        __tmp.put_f32_le(self.vx);
4695        __tmp.put_f32_le(self.vy);
4696        __tmp.put_f32_le(self.vz);
4697        __tmp.put_f32_le(self.ax);
4698        __tmp.put_f32_le(self.ay);
4699        __tmp.put_f32_le(self.az);
4700        for val in &self.covariance {
4701            __tmp.put_f32_le(*val);
4702        }
4703        __tmp.put_u8(self.estimator_type as u8);
4704        if matches!(version, MavlinkVersion::V2) {
4705            let len = __tmp.len();
4706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4707        } else {
4708            __tmp.len()
4709        }
4710    }
4711}
4712#[doc = "id: 73"]
4713#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
4714#[derive(Debug, Clone, PartialEq)]
4715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4717pub struct MISSION_ITEM_INT_DATA {
4718    #[doc = "PARAM1, see MAV_CMD enum"]
4719    pub param1: f32,
4720    #[doc = "PARAM2, see MAV_CMD enum"]
4721    pub param2: f32,
4722    #[doc = "PARAM3, see MAV_CMD enum"]
4723    pub param3: f32,
4724    #[doc = "PARAM4, see MAV_CMD enum"]
4725    pub param4: f32,
4726    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
4727    pub x: i32,
4728    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
4729    pub y: i32,
4730    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
4731    pub z: f32,
4732    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
4733    pub seq: u16,
4734    #[doc = "The scheduled action for the waypoint."]
4735    pub command: MavCmd,
4736    #[doc = "System ID"]
4737    pub target_system: u8,
4738    #[doc = "Component ID"]
4739    pub target_component: u8,
4740    #[doc = "The coordinate system of the waypoint."]
4741    pub frame: MavFrame,
4742    #[doc = "false:0, true:1"]
4743    pub current: u8,
4744    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
4745    pub autocontinue: u8,
4746    #[doc = "Mission type."]
4747    #[cfg_attr(feature = "serde", serde(default))]
4748    pub mission_type: MavMissionType,
4749}
4750impl MISSION_ITEM_INT_DATA {
4751    pub const ENCODED_LEN: usize = 38usize;
4752    pub const DEFAULT: Self = Self {
4753        param1: 0.0_f32,
4754        param2: 0.0_f32,
4755        param3: 0.0_f32,
4756        param4: 0.0_f32,
4757        x: 0_i32,
4758        y: 0_i32,
4759        z: 0.0_f32,
4760        seq: 0_u16,
4761        command: MavCmd::DEFAULT,
4762        target_system: 0_u8,
4763        target_component: 0_u8,
4764        frame: MavFrame::DEFAULT,
4765        current: 0_u8,
4766        autocontinue: 0_u8,
4767        mission_type: MavMissionType::DEFAULT,
4768    };
4769    #[cfg(feature = "arbitrary")]
4770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4771        use arbitrary::{Arbitrary, Unstructured};
4772        let mut buf = [0u8; 1024];
4773        rng.fill_bytes(&mut buf);
4774        let mut unstructured = Unstructured::new(&buf);
4775        Self::arbitrary(&mut unstructured).unwrap_or_default()
4776    }
4777}
4778impl Default for MISSION_ITEM_INT_DATA {
4779    fn default() -> Self {
4780        Self::DEFAULT.clone()
4781    }
4782}
4783impl MessageData for MISSION_ITEM_INT_DATA {
4784    type Message = MavMessage;
4785    const ID: u32 = 73u32;
4786    const NAME: &'static str = "MISSION_ITEM_INT";
4787    const EXTRA_CRC: u8 = 38u8;
4788    const ENCODED_LEN: usize = 38usize;
4789    fn deser(
4790        _version: MavlinkVersion,
4791        __input: &[u8],
4792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4793        let avail_len = __input.len();
4794        let mut payload_buf = [0; Self::ENCODED_LEN];
4795        let mut buf = if avail_len < Self::ENCODED_LEN {
4796            payload_buf[0..avail_len].copy_from_slice(__input);
4797            Bytes::new(&payload_buf)
4798        } else {
4799            Bytes::new(__input)
4800        };
4801        let mut __struct = Self::default();
4802        __struct.param1 = buf.get_f32_le();
4803        __struct.param2 = buf.get_f32_le();
4804        __struct.param3 = buf.get_f32_le();
4805        __struct.param4 = buf.get_f32_le();
4806        __struct.x = buf.get_i32_le();
4807        __struct.y = buf.get_i32_le();
4808        __struct.z = buf.get_f32_le();
4809        __struct.seq = buf.get_u16_le();
4810        let tmp = buf.get_u16_le();
4811        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
4812            ::mavlink_core::error::ParserError::InvalidEnum {
4813                enum_type: "MavCmd",
4814                value: tmp as u32,
4815            },
4816        )?;
4817        __struct.target_system = buf.get_u8();
4818        __struct.target_component = buf.get_u8();
4819        let tmp = buf.get_u8();
4820        __struct.frame =
4821            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4822                enum_type: "MavFrame",
4823                value: tmp as u32,
4824            })?;
4825        __struct.current = buf.get_u8();
4826        __struct.autocontinue = buf.get_u8();
4827        let tmp = buf.get_u8();
4828        __struct.mission_type =
4829            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4830                enum_type: "MavMissionType",
4831                value: tmp as u32,
4832            })?;
4833        Ok(__struct)
4834    }
4835    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4836        let mut __tmp = BytesMut::new(bytes);
4837        #[allow(clippy::absurd_extreme_comparisons)]
4838        #[allow(unused_comparisons)]
4839        if __tmp.remaining() < Self::ENCODED_LEN {
4840            panic!(
4841                "buffer is too small (need {} bytes, but got {})",
4842                Self::ENCODED_LEN,
4843                __tmp.remaining(),
4844            )
4845        }
4846        __tmp.put_f32_le(self.param1);
4847        __tmp.put_f32_le(self.param2);
4848        __tmp.put_f32_le(self.param3);
4849        __tmp.put_f32_le(self.param4);
4850        __tmp.put_i32_le(self.x);
4851        __tmp.put_i32_le(self.y);
4852        __tmp.put_f32_le(self.z);
4853        __tmp.put_u16_le(self.seq);
4854        __tmp.put_u16_le(self.command as u16);
4855        __tmp.put_u8(self.target_system);
4856        __tmp.put_u8(self.target_component);
4857        __tmp.put_u8(self.frame as u8);
4858        __tmp.put_u8(self.current);
4859        __tmp.put_u8(self.autocontinue);
4860        __tmp.put_u8(self.mission_type as u8);
4861        if matches!(version, MavlinkVersion::V2) {
4862            let len = __tmp.len();
4863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4864        } else {
4865            __tmp.len()
4866        }
4867    }
4868}
4869#[doc = "id: 106"]
4870#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
4871#[derive(Debug, Clone, PartialEq)]
4872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4874pub struct OPTICAL_FLOW_RAD_DATA {
4875    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4876    pub time_usec: u64,
4877    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
4878    pub integration_time_us: u32,
4879    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
4880    pub integrated_x: f32,
4881    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
4882    pub integrated_y: f32,
4883    #[doc = "RH rotation around X axis"]
4884    pub integrated_xgyro: f32,
4885    #[doc = "RH rotation around Y axis"]
4886    pub integrated_ygyro: f32,
4887    #[doc = "RH rotation around Z axis"]
4888    pub integrated_zgyro: f32,
4889    #[doc = "Time since the distance was sampled."]
4890    pub time_delta_distance_us: u32,
4891    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
4892    pub distance: f32,
4893    #[doc = "Temperature"]
4894    pub temperature: i16,
4895    #[doc = "Sensor ID"]
4896    pub sensor_id: u8,
4897    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
4898    pub quality: u8,
4899}
4900impl OPTICAL_FLOW_RAD_DATA {
4901    pub const ENCODED_LEN: usize = 44usize;
4902    pub const DEFAULT: Self = Self {
4903        time_usec: 0_u64,
4904        integration_time_us: 0_u32,
4905        integrated_x: 0.0_f32,
4906        integrated_y: 0.0_f32,
4907        integrated_xgyro: 0.0_f32,
4908        integrated_ygyro: 0.0_f32,
4909        integrated_zgyro: 0.0_f32,
4910        time_delta_distance_us: 0_u32,
4911        distance: 0.0_f32,
4912        temperature: 0_i16,
4913        sensor_id: 0_u8,
4914        quality: 0_u8,
4915    };
4916    #[cfg(feature = "arbitrary")]
4917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4918        use arbitrary::{Arbitrary, Unstructured};
4919        let mut buf = [0u8; 1024];
4920        rng.fill_bytes(&mut buf);
4921        let mut unstructured = Unstructured::new(&buf);
4922        Self::arbitrary(&mut unstructured).unwrap_or_default()
4923    }
4924}
4925impl Default for OPTICAL_FLOW_RAD_DATA {
4926    fn default() -> Self {
4927        Self::DEFAULT.clone()
4928    }
4929}
4930impl MessageData for OPTICAL_FLOW_RAD_DATA {
4931    type Message = MavMessage;
4932    const ID: u32 = 106u32;
4933    const NAME: &'static str = "OPTICAL_FLOW_RAD";
4934    const EXTRA_CRC: u8 = 138u8;
4935    const ENCODED_LEN: usize = 44usize;
4936    fn deser(
4937        _version: MavlinkVersion,
4938        __input: &[u8],
4939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4940        let avail_len = __input.len();
4941        let mut payload_buf = [0; Self::ENCODED_LEN];
4942        let mut buf = if avail_len < Self::ENCODED_LEN {
4943            payload_buf[0..avail_len].copy_from_slice(__input);
4944            Bytes::new(&payload_buf)
4945        } else {
4946            Bytes::new(__input)
4947        };
4948        let mut __struct = Self::default();
4949        __struct.time_usec = buf.get_u64_le();
4950        __struct.integration_time_us = buf.get_u32_le();
4951        __struct.integrated_x = buf.get_f32_le();
4952        __struct.integrated_y = buf.get_f32_le();
4953        __struct.integrated_xgyro = buf.get_f32_le();
4954        __struct.integrated_ygyro = buf.get_f32_le();
4955        __struct.integrated_zgyro = buf.get_f32_le();
4956        __struct.time_delta_distance_us = buf.get_u32_le();
4957        __struct.distance = buf.get_f32_le();
4958        __struct.temperature = buf.get_i16_le();
4959        __struct.sensor_id = buf.get_u8();
4960        __struct.quality = buf.get_u8();
4961        Ok(__struct)
4962    }
4963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4964        let mut __tmp = BytesMut::new(bytes);
4965        #[allow(clippy::absurd_extreme_comparisons)]
4966        #[allow(unused_comparisons)]
4967        if __tmp.remaining() < Self::ENCODED_LEN {
4968            panic!(
4969                "buffer is too small (need {} bytes, but got {})",
4970                Self::ENCODED_LEN,
4971                __tmp.remaining(),
4972            )
4973        }
4974        __tmp.put_u64_le(self.time_usec);
4975        __tmp.put_u32_le(self.integration_time_us);
4976        __tmp.put_f32_le(self.integrated_x);
4977        __tmp.put_f32_le(self.integrated_y);
4978        __tmp.put_f32_le(self.integrated_xgyro);
4979        __tmp.put_f32_le(self.integrated_ygyro);
4980        __tmp.put_f32_le(self.integrated_zgyro);
4981        __tmp.put_u32_le(self.time_delta_distance_us);
4982        __tmp.put_f32_le(self.distance);
4983        __tmp.put_i16_le(self.temperature);
4984        __tmp.put_u8(self.sensor_id);
4985        __tmp.put_u8(self.quality);
4986        if matches!(version, MavlinkVersion::V2) {
4987            let len = __tmp.len();
4988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4989        } else {
4990            __tmp.len()
4991        }
4992    }
4993}
4994#[doc = "id: 246"]
4995#[doc = "The location and information of an ADSB vehicle."]
4996#[derive(Debug, Clone, PartialEq)]
4997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4999pub struct ADSB_VEHICLE_DATA {
5000    #[doc = "ICAO address"]
5001    pub ICAO_address: u32,
5002    #[doc = "Latitude"]
5003    pub lat: i32,
5004    #[doc = "Longitude"]
5005    pub lon: i32,
5006    #[doc = "Altitude(ASL)"]
5007    pub altitude: i32,
5008    #[doc = "Course over ground"]
5009    pub heading: u16,
5010    #[doc = "The horizontal velocity"]
5011    pub hor_velocity: u16,
5012    #[doc = "The vertical velocity. Positive is up"]
5013    pub ver_velocity: i16,
5014    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5015    pub flags: AdsbFlags,
5016    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5017    pub squawk: u16,
5018    #[doc = "ADSB altitude type."]
5019    pub altitude_type: AdsbAltitudeType,
5020    #[doc = "The callsign, 8+null"]
5021    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5022    pub callsign: [u8; 9],
5023    #[doc = "ADSB emitter type."]
5024    pub emitter_type: AdsbEmitterType,
5025    #[doc = "Time since last communication in seconds"]
5026    pub tslc: u8,
5027}
5028impl ADSB_VEHICLE_DATA {
5029    pub const ENCODED_LEN: usize = 38usize;
5030    pub const DEFAULT: Self = Self {
5031        ICAO_address: 0_u32,
5032        lat: 0_i32,
5033        lon: 0_i32,
5034        altitude: 0_i32,
5035        heading: 0_u16,
5036        hor_velocity: 0_u16,
5037        ver_velocity: 0_i16,
5038        flags: AdsbFlags::DEFAULT,
5039        squawk: 0_u16,
5040        altitude_type: AdsbAltitudeType::DEFAULT,
5041        callsign: [0_u8; 9usize],
5042        emitter_type: AdsbEmitterType::DEFAULT,
5043        tslc: 0_u8,
5044    };
5045    #[cfg(feature = "arbitrary")]
5046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5047        use arbitrary::{Arbitrary, Unstructured};
5048        let mut buf = [0u8; 1024];
5049        rng.fill_bytes(&mut buf);
5050        let mut unstructured = Unstructured::new(&buf);
5051        Self::arbitrary(&mut unstructured).unwrap_or_default()
5052    }
5053}
5054impl Default for ADSB_VEHICLE_DATA {
5055    fn default() -> Self {
5056        Self::DEFAULT.clone()
5057    }
5058}
5059impl MessageData for ADSB_VEHICLE_DATA {
5060    type Message = MavMessage;
5061    const ID: u32 = 246u32;
5062    const NAME: &'static str = "ADSB_VEHICLE";
5063    const EXTRA_CRC: u8 = 184u8;
5064    const ENCODED_LEN: usize = 38usize;
5065    fn deser(
5066        _version: MavlinkVersion,
5067        __input: &[u8],
5068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5069        let avail_len = __input.len();
5070        let mut payload_buf = [0; Self::ENCODED_LEN];
5071        let mut buf = if avail_len < Self::ENCODED_LEN {
5072            payload_buf[0..avail_len].copy_from_slice(__input);
5073            Bytes::new(&payload_buf)
5074        } else {
5075            Bytes::new(__input)
5076        };
5077        let mut __struct = Self::default();
5078        __struct.ICAO_address = buf.get_u32_le();
5079        __struct.lat = buf.get_i32_le();
5080        __struct.lon = buf.get_i32_le();
5081        __struct.altitude = buf.get_i32_le();
5082        __struct.heading = buf.get_u16_le();
5083        __struct.hor_velocity = buf.get_u16_le();
5084        __struct.ver_velocity = buf.get_i16_le();
5085        let tmp = buf.get_u16_le();
5086        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5087            ::mavlink_core::error::ParserError::InvalidFlag {
5088                flag_type: "AdsbFlags",
5089                value: tmp as u32,
5090            },
5091        )?;
5092        __struct.squawk = buf.get_u16_le();
5093        let tmp = buf.get_u8();
5094        __struct.altitude_type =
5095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5096                enum_type: "AdsbAltitudeType",
5097                value: tmp as u32,
5098            })?;
5099        for v in &mut __struct.callsign {
5100            let val = buf.get_u8();
5101            *v = val;
5102        }
5103        let tmp = buf.get_u8();
5104        __struct.emitter_type =
5105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5106                enum_type: "AdsbEmitterType",
5107                value: tmp as u32,
5108            })?;
5109        __struct.tslc = buf.get_u8();
5110        Ok(__struct)
5111    }
5112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5113        let mut __tmp = BytesMut::new(bytes);
5114        #[allow(clippy::absurd_extreme_comparisons)]
5115        #[allow(unused_comparisons)]
5116        if __tmp.remaining() < Self::ENCODED_LEN {
5117            panic!(
5118                "buffer is too small (need {} bytes, but got {})",
5119                Self::ENCODED_LEN,
5120                __tmp.remaining(),
5121            )
5122        }
5123        __tmp.put_u32_le(self.ICAO_address);
5124        __tmp.put_i32_le(self.lat);
5125        __tmp.put_i32_le(self.lon);
5126        __tmp.put_i32_le(self.altitude);
5127        __tmp.put_u16_le(self.heading);
5128        __tmp.put_u16_le(self.hor_velocity);
5129        __tmp.put_i16_le(self.ver_velocity);
5130        __tmp.put_u16_le(self.flags.bits());
5131        __tmp.put_u16_le(self.squawk);
5132        __tmp.put_u8(self.altitude_type as u8);
5133        for val in &self.callsign {
5134            __tmp.put_u8(*val);
5135        }
5136        __tmp.put_u8(self.emitter_type as u8);
5137        __tmp.put_u8(self.tslc);
5138        if matches!(version, MavlinkVersion::V2) {
5139            let len = __tmp.len();
5140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5141        } else {
5142            __tmp.len()
5143        }
5144    }
5145}
5146#[doc = "id: 26"]
5147#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
5148#[derive(Debug, Clone, PartialEq)]
5149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5151pub struct SCALED_IMU_DATA {
5152    #[doc = "Timestamp (time since system boot)."]
5153    pub time_boot_ms: u32,
5154    #[doc = "X acceleration"]
5155    pub xacc: i16,
5156    #[doc = "Y acceleration"]
5157    pub yacc: i16,
5158    #[doc = "Z acceleration"]
5159    pub zacc: i16,
5160    #[doc = "Angular speed around X axis"]
5161    pub xgyro: i16,
5162    #[doc = "Angular speed around Y axis"]
5163    pub ygyro: i16,
5164    #[doc = "Angular speed around Z axis"]
5165    pub zgyro: i16,
5166    #[doc = "X Magnetic field"]
5167    pub xmag: i16,
5168    #[doc = "Y Magnetic field"]
5169    pub ymag: i16,
5170    #[doc = "Z Magnetic field"]
5171    pub zmag: i16,
5172    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
5173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5174    pub temperature: i16,
5175}
5176impl SCALED_IMU_DATA {
5177    pub const ENCODED_LEN: usize = 24usize;
5178    pub const DEFAULT: Self = Self {
5179        time_boot_ms: 0_u32,
5180        xacc: 0_i16,
5181        yacc: 0_i16,
5182        zacc: 0_i16,
5183        xgyro: 0_i16,
5184        ygyro: 0_i16,
5185        zgyro: 0_i16,
5186        xmag: 0_i16,
5187        ymag: 0_i16,
5188        zmag: 0_i16,
5189        temperature: 0_i16,
5190    };
5191    #[cfg(feature = "arbitrary")]
5192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5193        use arbitrary::{Arbitrary, Unstructured};
5194        let mut buf = [0u8; 1024];
5195        rng.fill_bytes(&mut buf);
5196        let mut unstructured = Unstructured::new(&buf);
5197        Self::arbitrary(&mut unstructured).unwrap_or_default()
5198    }
5199}
5200impl Default for SCALED_IMU_DATA {
5201    fn default() -> Self {
5202        Self::DEFAULT.clone()
5203    }
5204}
5205impl MessageData for SCALED_IMU_DATA {
5206    type Message = MavMessage;
5207    const ID: u32 = 26u32;
5208    const NAME: &'static str = "SCALED_IMU";
5209    const EXTRA_CRC: u8 = 170u8;
5210    const ENCODED_LEN: usize = 24usize;
5211    fn deser(
5212        _version: MavlinkVersion,
5213        __input: &[u8],
5214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5215        let avail_len = __input.len();
5216        let mut payload_buf = [0; Self::ENCODED_LEN];
5217        let mut buf = if avail_len < Self::ENCODED_LEN {
5218            payload_buf[0..avail_len].copy_from_slice(__input);
5219            Bytes::new(&payload_buf)
5220        } else {
5221            Bytes::new(__input)
5222        };
5223        let mut __struct = Self::default();
5224        __struct.time_boot_ms = buf.get_u32_le();
5225        __struct.xacc = buf.get_i16_le();
5226        __struct.yacc = buf.get_i16_le();
5227        __struct.zacc = buf.get_i16_le();
5228        __struct.xgyro = buf.get_i16_le();
5229        __struct.ygyro = buf.get_i16_le();
5230        __struct.zgyro = buf.get_i16_le();
5231        __struct.xmag = buf.get_i16_le();
5232        __struct.ymag = buf.get_i16_le();
5233        __struct.zmag = buf.get_i16_le();
5234        __struct.temperature = buf.get_i16_le();
5235        Ok(__struct)
5236    }
5237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5238        let mut __tmp = BytesMut::new(bytes);
5239        #[allow(clippy::absurd_extreme_comparisons)]
5240        #[allow(unused_comparisons)]
5241        if __tmp.remaining() < Self::ENCODED_LEN {
5242            panic!(
5243                "buffer is too small (need {} bytes, but got {})",
5244                Self::ENCODED_LEN,
5245                __tmp.remaining(),
5246            )
5247        }
5248        __tmp.put_u32_le(self.time_boot_ms);
5249        __tmp.put_i16_le(self.xacc);
5250        __tmp.put_i16_le(self.yacc);
5251        __tmp.put_i16_le(self.zacc);
5252        __tmp.put_i16_le(self.xgyro);
5253        __tmp.put_i16_le(self.ygyro);
5254        __tmp.put_i16_le(self.zgyro);
5255        __tmp.put_i16_le(self.xmag);
5256        __tmp.put_i16_le(self.ymag);
5257        __tmp.put_i16_le(self.zmag);
5258        __tmp.put_i16_le(self.temperature);
5259        if matches!(version, MavlinkVersion::V2) {
5260            let len = __tmp.len();
5261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5262        } else {
5263            __tmp.len()
5264        }
5265    }
5266}
5267#[doc = "id: 49"]
5268#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
5269#[derive(Debug, Clone, PartialEq)]
5270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5272pub struct GPS_GLOBAL_ORIGIN_DATA {
5273    #[doc = "Latitude (WGS84)"]
5274    pub latitude: i32,
5275    #[doc = "Longitude (WGS84)"]
5276    pub longitude: i32,
5277    #[doc = "Altitude (MSL). Positive for up."]
5278    pub altitude: i32,
5279    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5280    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5281    pub time_usec: u64,
5282}
5283impl GPS_GLOBAL_ORIGIN_DATA {
5284    pub const ENCODED_LEN: usize = 20usize;
5285    pub const DEFAULT: Self = Self {
5286        latitude: 0_i32,
5287        longitude: 0_i32,
5288        altitude: 0_i32,
5289        time_usec: 0_u64,
5290    };
5291    #[cfg(feature = "arbitrary")]
5292    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5293        use arbitrary::{Arbitrary, Unstructured};
5294        let mut buf = [0u8; 1024];
5295        rng.fill_bytes(&mut buf);
5296        let mut unstructured = Unstructured::new(&buf);
5297        Self::arbitrary(&mut unstructured).unwrap_or_default()
5298    }
5299}
5300impl Default for GPS_GLOBAL_ORIGIN_DATA {
5301    fn default() -> Self {
5302        Self::DEFAULT.clone()
5303    }
5304}
5305impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
5306    type Message = MavMessage;
5307    const ID: u32 = 49u32;
5308    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
5309    const EXTRA_CRC: u8 = 39u8;
5310    const ENCODED_LEN: usize = 20usize;
5311    fn deser(
5312        _version: MavlinkVersion,
5313        __input: &[u8],
5314    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5315        let avail_len = __input.len();
5316        let mut payload_buf = [0; Self::ENCODED_LEN];
5317        let mut buf = if avail_len < Self::ENCODED_LEN {
5318            payload_buf[0..avail_len].copy_from_slice(__input);
5319            Bytes::new(&payload_buf)
5320        } else {
5321            Bytes::new(__input)
5322        };
5323        let mut __struct = Self::default();
5324        __struct.latitude = buf.get_i32_le();
5325        __struct.longitude = buf.get_i32_le();
5326        __struct.altitude = buf.get_i32_le();
5327        __struct.time_usec = buf.get_u64_le();
5328        Ok(__struct)
5329    }
5330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5331        let mut __tmp = BytesMut::new(bytes);
5332        #[allow(clippy::absurd_extreme_comparisons)]
5333        #[allow(unused_comparisons)]
5334        if __tmp.remaining() < Self::ENCODED_LEN {
5335            panic!(
5336                "buffer is too small (need {} bytes, but got {})",
5337                Self::ENCODED_LEN,
5338                __tmp.remaining(),
5339            )
5340        }
5341        __tmp.put_i32_le(self.latitude);
5342        __tmp.put_i32_le(self.longitude);
5343        __tmp.put_i32_le(self.altitude);
5344        __tmp.put_u64_le(self.time_usec);
5345        if matches!(version, MavlinkVersion::V2) {
5346            let len = __tmp.len();
5347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5348        } else {
5349            __tmp.len()
5350        }
5351    }
5352}
5353#[doc = "id: 280"]
5354#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
5355#[derive(Debug, Clone, PartialEq)]
5356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5358pub struct GIMBAL_MANAGER_INFORMATION_DATA {
5359    #[doc = "Timestamp (time since system boot)."]
5360    pub time_boot_ms: u32,
5361    #[doc = "Bitmap of gimbal capability flags."]
5362    pub cap_flags: GimbalManagerCapFlags,
5363    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
5364    pub roll_min: f32,
5365    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
5366    pub roll_max: f32,
5367    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
5368    pub pitch_min: f32,
5369    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
5370    pub pitch_max: f32,
5371    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
5372    pub yaw_min: f32,
5373    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
5374    pub yaw_max: f32,
5375    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
5376    pub gimbal_device_id: u8,
5377}
5378impl GIMBAL_MANAGER_INFORMATION_DATA {
5379    pub const ENCODED_LEN: usize = 33usize;
5380    pub const DEFAULT: Self = Self {
5381        time_boot_ms: 0_u32,
5382        cap_flags: GimbalManagerCapFlags::DEFAULT,
5383        roll_min: 0.0_f32,
5384        roll_max: 0.0_f32,
5385        pitch_min: 0.0_f32,
5386        pitch_max: 0.0_f32,
5387        yaw_min: 0.0_f32,
5388        yaw_max: 0.0_f32,
5389        gimbal_device_id: 0_u8,
5390    };
5391    #[cfg(feature = "arbitrary")]
5392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5393        use arbitrary::{Arbitrary, Unstructured};
5394        let mut buf = [0u8; 1024];
5395        rng.fill_bytes(&mut buf);
5396        let mut unstructured = Unstructured::new(&buf);
5397        Self::arbitrary(&mut unstructured).unwrap_or_default()
5398    }
5399}
5400impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
5401    fn default() -> Self {
5402        Self::DEFAULT.clone()
5403    }
5404}
5405impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
5406    type Message = MavMessage;
5407    const ID: u32 = 280u32;
5408    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
5409    const EXTRA_CRC: u8 = 70u8;
5410    const ENCODED_LEN: usize = 33usize;
5411    fn deser(
5412        _version: MavlinkVersion,
5413        __input: &[u8],
5414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5415        let avail_len = __input.len();
5416        let mut payload_buf = [0; Self::ENCODED_LEN];
5417        let mut buf = if avail_len < Self::ENCODED_LEN {
5418            payload_buf[0..avail_len].copy_from_slice(__input);
5419            Bytes::new(&payload_buf)
5420        } else {
5421            Bytes::new(__input)
5422        };
5423        let mut __struct = Self::default();
5424        __struct.time_boot_ms = buf.get_u32_le();
5425        let tmp = buf.get_u32_le();
5426        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
5427            tmp & GimbalManagerCapFlags::all().bits(),
5428        )
5429        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5430            flag_type: "GimbalManagerCapFlags",
5431            value: tmp as u32,
5432        })?;
5433        __struct.roll_min = buf.get_f32_le();
5434        __struct.roll_max = buf.get_f32_le();
5435        __struct.pitch_min = buf.get_f32_le();
5436        __struct.pitch_max = buf.get_f32_le();
5437        __struct.yaw_min = buf.get_f32_le();
5438        __struct.yaw_max = buf.get_f32_le();
5439        __struct.gimbal_device_id = buf.get_u8();
5440        Ok(__struct)
5441    }
5442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5443        let mut __tmp = BytesMut::new(bytes);
5444        #[allow(clippy::absurd_extreme_comparisons)]
5445        #[allow(unused_comparisons)]
5446        if __tmp.remaining() < Self::ENCODED_LEN {
5447            panic!(
5448                "buffer is too small (need {} bytes, but got {})",
5449                Self::ENCODED_LEN,
5450                __tmp.remaining(),
5451            )
5452        }
5453        __tmp.put_u32_le(self.time_boot_ms);
5454        __tmp.put_u32_le(self.cap_flags.bits());
5455        __tmp.put_f32_le(self.roll_min);
5456        __tmp.put_f32_le(self.roll_max);
5457        __tmp.put_f32_le(self.pitch_min);
5458        __tmp.put_f32_le(self.pitch_max);
5459        __tmp.put_f32_le(self.yaw_min);
5460        __tmp.put_f32_le(self.yaw_max);
5461        __tmp.put_u8(self.gimbal_device_id);
5462        if matches!(version, MavlinkVersion::V2) {
5463            let len = __tmp.len();
5464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5465        } else {
5466            __tmp.len()
5467        }
5468    }
5469}
5470#[doc = "id: 74"]
5471#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
5472#[derive(Debug, Clone, PartialEq)]
5473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5475pub struct VFR_HUD_DATA {
5476    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
5477    pub airspeed: f32,
5478    #[doc = "Current ground speed."]
5479    pub groundspeed: f32,
5480    #[doc = "Current altitude (MSL)."]
5481    pub alt: f32,
5482    #[doc = "Current climb rate."]
5483    pub climb: f32,
5484    #[doc = "Current heading in compass units (0-360, 0=north)."]
5485    pub heading: i16,
5486    #[doc = "Current throttle setting (0 to 100)."]
5487    pub throttle: u16,
5488}
5489impl VFR_HUD_DATA {
5490    pub const ENCODED_LEN: usize = 20usize;
5491    pub const DEFAULT: Self = Self {
5492        airspeed: 0.0_f32,
5493        groundspeed: 0.0_f32,
5494        alt: 0.0_f32,
5495        climb: 0.0_f32,
5496        heading: 0_i16,
5497        throttle: 0_u16,
5498    };
5499    #[cfg(feature = "arbitrary")]
5500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5501        use arbitrary::{Arbitrary, Unstructured};
5502        let mut buf = [0u8; 1024];
5503        rng.fill_bytes(&mut buf);
5504        let mut unstructured = Unstructured::new(&buf);
5505        Self::arbitrary(&mut unstructured).unwrap_or_default()
5506    }
5507}
5508impl Default for VFR_HUD_DATA {
5509    fn default() -> Self {
5510        Self::DEFAULT.clone()
5511    }
5512}
5513impl MessageData for VFR_HUD_DATA {
5514    type Message = MavMessage;
5515    const ID: u32 = 74u32;
5516    const NAME: &'static str = "VFR_HUD";
5517    const EXTRA_CRC: u8 = 20u8;
5518    const ENCODED_LEN: usize = 20usize;
5519    fn deser(
5520        _version: MavlinkVersion,
5521        __input: &[u8],
5522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5523        let avail_len = __input.len();
5524        let mut payload_buf = [0; Self::ENCODED_LEN];
5525        let mut buf = if avail_len < Self::ENCODED_LEN {
5526            payload_buf[0..avail_len].copy_from_slice(__input);
5527            Bytes::new(&payload_buf)
5528        } else {
5529            Bytes::new(__input)
5530        };
5531        let mut __struct = Self::default();
5532        __struct.airspeed = buf.get_f32_le();
5533        __struct.groundspeed = buf.get_f32_le();
5534        __struct.alt = buf.get_f32_le();
5535        __struct.climb = buf.get_f32_le();
5536        __struct.heading = buf.get_i16_le();
5537        __struct.throttle = buf.get_u16_le();
5538        Ok(__struct)
5539    }
5540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5541        let mut __tmp = BytesMut::new(bytes);
5542        #[allow(clippy::absurd_extreme_comparisons)]
5543        #[allow(unused_comparisons)]
5544        if __tmp.remaining() < Self::ENCODED_LEN {
5545            panic!(
5546                "buffer is too small (need {} bytes, but got {})",
5547                Self::ENCODED_LEN,
5548                __tmp.remaining(),
5549            )
5550        }
5551        __tmp.put_f32_le(self.airspeed);
5552        __tmp.put_f32_le(self.groundspeed);
5553        __tmp.put_f32_le(self.alt);
5554        __tmp.put_f32_le(self.climb);
5555        __tmp.put_i16_le(self.heading);
5556        __tmp.put_u16_le(self.throttle);
5557        if matches!(version, MavlinkVersion::V2) {
5558            let len = __tmp.len();
5559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5560        } else {
5561            __tmp.len()
5562        }
5563    }
5564}
5565#[doc = "id: 375"]
5566#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
5567#[derive(Debug, Clone, PartialEq)]
5568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5570pub struct ACTUATOR_OUTPUT_STATUS_DATA {
5571    #[doc = "Timestamp (since system boot)."]
5572    pub time_usec: u64,
5573    #[doc = "Active outputs"]
5574    pub active: u32,
5575    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
5576    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5577    pub actuator: [f32; 32],
5578}
5579impl ACTUATOR_OUTPUT_STATUS_DATA {
5580    pub const ENCODED_LEN: usize = 140usize;
5581    pub const DEFAULT: Self = Self {
5582        time_usec: 0_u64,
5583        active: 0_u32,
5584        actuator: [0.0_f32; 32usize],
5585    };
5586    #[cfg(feature = "arbitrary")]
5587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5588        use arbitrary::{Arbitrary, Unstructured};
5589        let mut buf = [0u8; 1024];
5590        rng.fill_bytes(&mut buf);
5591        let mut unstructured = Unstructured::new(&buf);
5592        Self::arbitrary(&mut unstructured).unwrap_or_default()
5593    }
5594}
5595impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5596    fn default() -> Self {
5597        Self::DEFAULT.clone()
5598    }
5599}
5600impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5601    type Message = MavMessage;
5602    const ID: u32 = 375u32;
5603    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5604    const EXTRA_CRC: u8 = 251u8;
5605    const ENCODED_LEN: usize = 140usize;
5606    fn deser(
5607        _version: MavlinkVersion,
5608        __input: &[u8],
5609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5610        let avail_len = __input.len();
5611        let mut payload_buf = [0; Self::ENCODED_LEN];
5612        let mut buf = if avail_len < Self::ENCODED_LEN {
5613            payload_buf[0..avail_len].copy_from_slice(__input);
5614            Bytes::new(&payload_buf)
5615        } else {
5616            Bytes::new(__input)
5617        };
5618        let mut __struct = Self::default();
5619        __struct.time_usec = buf.get_u64_le();
5620        __struct.active = buf.get_u32_le();
5621        for v in &mut __struct.actuator {
5622            let val = buf.get_f32_le();
5623            *v = val;
5624        }
5625        Ok(__struct)
5626    }
5627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5628        let mut __tmp = BytesMut::new(bytes);
5629        #[allow(clippy::absurd_extreme_comparisons)]
5630        #[allow(unused_comparisons)]
5631        if __tmp.remaining() < Self::ENCODED_LEN {
5632            panic!(
5633                "buffer is too small (need {} bytes, but got {})",
5634                Self::ENCODED_LEN,
5635                __tmp.remaining(),
5636            )
5637        }
5638        __tmp.put_u64_le(self.time_usec);
5639        __tmp.put_u32_le(self.active);
5640        for val in &self.actuator {
5641            __tmp.put_f32_le(*val);
5642        }
5643        if matches!(version, MavlinkVersion::V2) {
5644            let len = __tmp.len();
5645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5646        } else {
5647            __tmp.len()
5648        }
5649    }
5650}
5651#[doc = "id: 242"]
5652#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
5653#[derive(Debug, Clone, PartialEq)]
5654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5656pub struct HOME_POSITION_DATA {
5657    #[doc = "Latitude (WGS84)"]
5658    pub latitude: i32,
5659    #[doc = "Longitude (WGS84)"]
5660    pub longitude: i32,
5661    #[doc = "Altitude (MSL). Positive for up."]
5662    pub altitude: i32,
5663    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
5664    pub x: f32,
5665    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
5666    pub y: f32,
5667    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
5668    pub z: f32,
5669    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
5670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5671    pub q: [f32; 4],
5672    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
5673    pub approach_x: f32,
5674    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
5675    pub approach_y: f32,
5676    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
5677    pub approach_z: f32,
5678    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5680    pub time_usec: u64,
5681}
5682impl HOME_POSITION_DATA {
5683    pub const ENCODED_LEN: usize = 60usize;
5684    pub const DEFAULT: Self = Self {
5685        latitude: 0_i32,
5686        longitude: 0_i32,
5687        altitude: 0_i32,
5688        x: 0.0_f32,
5689        y: 0.0_f32,
5690        z: 0.0_f32,
5691        q: [0.0_f32; 4usize],
5692        approach_x: 0.0_f32,
5693        approach_y: 0.0_f32,
5694        approach_z: 0.0_f32,
5695        time_usec: 0_u64,
5696    };
5697    #[cfg(feature = "arbitrary")]
5698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5699        use arbitrary::{Arbitrary, Unstructured};
5700        let mut buf = [0u8; 1024];
5701        rng.fill_bytes(&mut buf);
5702        let mut unstructured = Unstructured::new(&buf);
5703        Self::arbitrary(&mut unstructured).unwrap_or_default()
5704    }
5705}
5706impl Default for HOME_POSITION_DATA {
5707    fn default() -> Self {
5708        Self::DEFAULT.clone()
5709    }
5710}
5711impl MessageData for HOME_POSITION_DATA {
5712    type Message = MavMessage;
5713    const ID: u32 = 242u32;
5714    const NAME: &'static str = "HOME_POSITION";
5715    const EXTRA_CRC: u8 = 104u8;
5716    const ENCODED_LEN: usize = 60usize;
5717    fn deser(
5718        _version: MavlinkVersion,
5719        __input: &[u8],
5720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5721        let avail_len = __input.len();
5722        let mut payload_buf = [0; Self::ENCODED_LEN];
5723        let mut buf = if avail_len < Self::ENCODED_LEN {
5724            payload_buf[0..avail_len].copy_from_slice(__input);
5725            Bytes::new(&payload_buf)
5726        } else {
5727            Bytes::new(__input)
5728        };
5729        let mut __struct = Self::default();
5730        __struct.latitude = buf.get_i32_le();
5731        __struct.longitude = buf.get_i32_le();
5732        __struct.altitude = buf.get_i32_le();
5733        __struct.x = buf.get_f32_le();
5734        __struct.y = buf.get_f32_le();
5735        __struct.z = buf.get_f32_le();
5736        for v in &mut __struct.q {
5737            let val = buf.get_f32_le();
5738            *v = val;
5739        }
5740        __struct.approach_x = buf.get_f32_le();
5741        __struct.approach_y = buf.get_f32_le();
5742        __struct.approach_z = buf.get_f32_le();
5743        __struct.time_usec = buf.get_u64_le();
5744        Ok(__struct)
5745    }
5746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5747        let mut __tmp = BytesMut::new(bytes);
5748        #[allow(clippy::absurd_extreme_comparisons)]
5749        #[allow(unused_comparisons)]
5750        if __tmp.remaining() < Self::ENCODED_LEN {
5751            panic!(
5752                "buffer is too small (need {} bytes, but got {})",
5753                Self::ENCODED_LEN,
5754                __tmp.remaining(),
5755            )
5756        }
5757        __tmp.put_i32_le(self.latitude);
5758        __tmp.put_i32_le(self.longitude);
5759        __tmp.put_i32_le(self.altitude);
5760        __tmp.put_f32_le(self.x);
5761        __tmp.put_f32_le(self.y);
5762        __tmp.put_f32_le(self.z);
5763        for val in &self.q {
5764            __tmp.put_f32_le(*val);
5765        }
5766        __tmp.put_f32_le(self.approach_x);
5767        __tmp.put_f32_le(self.approach_y);
5768        __tmp.put_f32_le(self.approach_z);
5769        __tmp.put_u64_le(self.time_usec);
5770        if matches!(version, MavlinkVersion::V2) {
5771            let len = __tmp.len();
5772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5773        } else {
5774            __tmp.len()
5775        }
5776    }
5777}
5778#[doc = "id: 37"]
5779#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
5780#[derive(Debug, Clone, PartialEq)]
5781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5783pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
5784    #[doc = "Start index"]
5785    pub start_index: i16,
5786    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
5787    pub end_index: i16,
5788    #[doc = "System ID"]
5789    pub target_system: u8,
5790    #[doc = "Component ID"]
5791    pub target_component: u8,
5792    #[doc = "Mission type."]
5793    #[cfg_attr(feature = "serde", serde(default))]
5794    pub mission_type: MavMissionType,
5795}
5796impl MISSION_REQUEST_PARTIAL_LIST_DATA {
5797    pub const ENCODED_LEN: usize = 7usize;
5798    pub const DEFAULT: Self = Self {
5799        start_index: 0_i16,
5800        end_index: 0_i16,
5801        target_system: 0_u8,
5802        target_component: 0_u8,
5803        mission_type: MavMissionType::DEFAULT,
5804    };
5805    #[cfg(feature = "arbitrary")]
5806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5807        use arbitrary::{Arbitrary, Unstructured};
5808        let mut buf = [0u8; 1024];
5809        rng.fill_bytes(&mut buf);
5810        let mut unstructured = Unstructured::new(&buf);
5811        Self::arbitrary(&mut unstructured).unwrap_or_default()
5812    }
5813}
5814impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
5815    fn default() -> Self {
5816        Self::DEFAULT.clone()
5817    }
5818}
5819impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
5820    type Message = MavMessage;
5821    const ID: u32 = 37u32;
5822    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
5823    const EXTRA_CRC: u8 = 212u8;
5824    const ENCODED_LEN: usize = 7usize;
5825    fn deser(
5826        _version: MavlinkVersion,
5827        __input: &[u8],
5828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5829        let avail_len = __input.len();
5830        let mut payload_buf = [0; Self::ENCODED_LEN];
5831        let mut buf = if avail_len < Self::ENCODED_LEN {
5832            payload_buf[0..avail_len].copy_from_slice(__input);
5833            Bytes::new(&payload_buf)
5834        } else {
5835            Bytes::new(__input)
5836        };
5837        let mut __struct = Self::default();
5838        __struct.start_index = buf.get_i16_le();
5839        __struct.end_index = buf.get_i16_le();
5840        __struct.target_system = buf.get_u8();
5841        __struct.target_component = buf.get_u8();
5842        let tmp = buf.get_u8();
5843        __struct.mission_type =
5844            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5845                enum_type: "MavMissionType",
5846                value: tmp as u32,
5847            })?;
5848        Ok(__struct)
5849    }
5850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5851        let mut __tmp = BytesMut::new(bytes);
5852        #[allow(clippy::absurd_extreme_comparisons)]
5853        #[allow(unused_comparisons)]
5854        if __tmp.remaining() < Self::ENCODED_LEN {
5855            panic!(
5856                "buffer is too small (need {} bytes, but got {})",
5857                Self::ENCODED_LEN,
5858                __tmp.remaining(),
5859            )
5860        }
5861        __tmp.put_i16_le(self.start_index);
5862        __tmp.put_i16_le(self.end_index);
5863        __tmp.put_u8(self.target_system);
5864        __tmp.put_u8(self.target_component);
5865        __tmp.put_u8(self.mission_type as u8);
5866        if matches!(version, MavlinkVersion::V2) {
5867            let len = __tmp.len();
5868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5869        } else {
5870            __tmp.len()
5871        }
5872    }
5873}
5874#[doc = "id: 435"]
5875#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
5876#[derive(Debug, Clone, PartialEq)]
5877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5879pub struct AVAILABLE_MODES_DATA {
5880    #[doc = "A bitfield for use for autopilot-specific flags"]
5881    pub custom_mode: u32,
5882    #[doc = "Mode properties."]
5883    pub properties: MavModeProperty,
5884    #[doc = "The total number of available modes for the current vehicle type."]
5885    pub number_modes: u8,
5886    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
5887    pub mode_index: u8,
5888    #[doc = "Standard mode."]
5889    pub standard_mode: MavStandardMode,
5890    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
5891    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5892    pub mode_name: [u8; 35],
5893}
5894impl AVAILABLE_MODES_DATA {
5895    pub const ENCODED_LEN: usize = 46usize;
5896    pub const DEFAULT: Self = Self {
5897        custom_mode: 0_u32,
5898        properties: MavModeProperty::DEFAULT,
5899        number_modes: 0_u8,
5900        mode_index: 0_u8,
5901        standard_mode: MavStandardMode::DEFAULT,
5902        mode_name: [0_u8; 35usize],
5903    };
5904    #[cfg(feature = "arbitrary")]
5905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5906        use arbitrary::{Arbitrary, Unstructured};
5907        let mut buf = [0u8; 1024];
5908        rng.fill_bytes(&mut buf);
5909        let mut unstructured = Unstructured::new(&buf);
5910        Self::arbitrary(&mut unstructured).unwrap_or_default()
5911    }
5912}
5913impl Default for AVAILABLE_MODES_DATA {
5914    fn default() -> Self {
5915        Self::DEFAULT.clone()
5916    }
5917}
5918impl MessageData for AVAILABLE_MODES_DATA {
5919    type Message = MavMessage;
5920    const ID: u32 = 435u32;
5921    const NAME: &'static str = "AVAILABLE_MODES";
5922    const EXTRA_CRC: u8 = 134u8;
5923    const ENCODED_LEN: usize = 46usize;
5924    fn deser(
5925        _version: MavlinkVersion,
5926        __input: &[u8],
5927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5928        let avail_len = __input.len();
5929        let mut payload_buf = [0; Self::ENCODED_LEN];
5930        let mut buf = if avail_len < Self::ENCODED_LEN {
5931            payload_buf[0..avail_len].copy_from_slice(__input);
5932            Bytes::new(&payload_buf)
5933        } else {
5934            Bytes::new(__input)
5935        };
5936        let mut __struct = Self::default();
5937        __struct.custom_mode = buf.get_u32_le();
5938        let tmp = buf.get_u32_le();
5939        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
5940            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5941                flag_type: "MavModeProperty",
5942                value: tmp as u32,
5943            })?;
5944        __struct.number_modes = buf.get_u8();
5945        __struct.mode_index = buf.get_u8();
5946        let tmp = buf.get_u8();
5947        __struct.standard_mode =
5948            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5949                enum_type: "MavStandardMode",
5950                value: tmp as u32,
5951            })?;
5952        for v in &mut __struct.mode_name {
5953            let val = buf.get_u8();
5954            *v = val;
5955        }
5956        Ok(__struct)
5957    }
5958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5959        let mut __tmp = BytesMut::new(bytes);
5960        #[allow(clippy::absurd_extreme_comparisons)]
5961        #[allow(unused_comparisons)]
5962        if __tmp.remaining() < Self::ENCODED_LEN {
5963            panic!(
5964                "buffer is too small (need {} bytes, but got {})",
5965                Self::ENCODED_LEN,
5966                __tmp.remaining(),
5967            )
5968        }
5969        __tmp.put_u32_le(self.custom_mode);
5970        __tmp.put_u32_le(self.properties.bits());
5971        __tmp.put_u8(self.number_modes);
5972        __tmp.put_u8(self.mode_index);
5973        __tmp.put_u8(self.standard_mode as u8);
5974        for val in &self.mode_name {
5975            __tmp.put_u8(*val);
5976        }
5977        if matches!(version, MavlinkVersion::V2) {
5978            let len = __tmp.len();
5979            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5980        } else {
5981            __tmp.len()
5982        }
5983    }
5984}
5985#[doc = "id: 123"]
5986#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
5987#[derive(Debug, Clone, PartialEq)]
5988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5990pub struct GPS_INJECT_DATA_DATA {
5991    #[doc = "System ID"]
5992    pub target_system: u8,
5993    #[doc = "Component ID"]
5994    pub target_component: u8,
5995    #[doc = "Data length"]
5996    pub len: u8,
5997    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
5998    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5999    pub data: [u8; 110],
6000}
6001impl GPS_INJECT_DATA_DATA {
6002    pub const ENCODED_LEN: usize = 113usize;
6003    pub const DEFAULT: Self = Self {
6004        target_system: 0_u8,
6005        target_component: 0_u8,
6006        len: 0_u8,
6007        data: [0_u8; 110usize],
6008    };
6009    #[cfg(feature = "arbitrary")]
6010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6011        use arbitrary::{Arbitrary, Unstructured};
6012        let mut buf = [0u8; 1024];
6013        rng.fill_bytes(&mut buf);
6014        let mut unstructured = Unstructured::new(&buf);
6015        Self::arbitrary(&mut unstructured).unwrap_or_default()
6016    }
6017}
6018impl Default for GPS_INJECT_DATA_DATA {
6019    fn default() -> Self {
6020        Self::DEFAULT.clone()
6021    }
6022}
6023impl MessageData for GPS_INJECT_DATA_DATA {
6024    type Message = MavMessage;
6025    const ID: u32 = 123u32;
6026    const NAME: &'static str = "GPS_INJECT_DATA";
6027    const EXTRA_CRC: u8 = 250u8;
6028    const ENCODED_LEN: usize = 113usize;
6029    fn deser(
6030        _version: MavlinkVersion,
6031        __input: &[u8],
6032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6033        let avail_len = __input.len();
6034        let mut payload_buf = [0; Self::ENCODED_LEN];
6035        let mut buf = if avail_len < Self::ENCODED_LEN {
6036            payload_buf[0..avail_len].copy_from_slice(__input);
6037            Bytes::new(&payload_buf)
6038        } else {
6039            Bytes::new(__input)
6040        };
6041        let mut __struct = Self::default();
6042        __struct.target_system = buf.get_u8();
6043        __struct.target_component = buf.get_u8();
6044        __struct.len = buf.get_u8();
6045        for v in &mut __struct.data {
6046            let val = buf.get_u8();
6047            *v = val;
6048        }
6049        Ok(__struct)
6050    }
6051    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6052        let mut __tmp = BytesMut::new(bytes);
6053        #[allow(clippy::absurd_extreme_comparisons)]
6054        #[allow(unused_comparisons)]
6055        if __tmp.remaining() < Self::ENCODED_LEN {
6056            panic!(
6057                "buffer is too small (need {} bytes, but got {})",
6058                Self::ENCODED_LEN,
6059                __tmp.remaining(),
6060            )
6061        }
6062        __tmp.put_u8(self.target_system);
6063        __tmp.put_u8(self.target_component);
6064        __tmp.put_u8(self.len);
6065        for val in &self.data {
6066            __tmp.put_u8(*val);
6067        }
6068        if matches!(version, MavlinkVersion::V2) {
6069            let len = __tmp.len();
6070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6071        } else {
6072            __tmp.len()
6073        }
6074    }
6075}
6076#[doc = "id: 30"]
6077#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
6078#[derive(Debug, Clone, PartialEq)]
6079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6081pub struct ATTITUDE_DATA {
6082    #[doc = "Timestamp (time since system boot)."]
6083    pub time_boot_ms: u32,
6084    #[doc = "Roll angle (-pi..+pi)"]
6085    pub roll: f32,
6086    #[doc = "Pitch angle (-pi..+pi)"]
6087    pub pitch: f32,
6088    #[doc = "Yaw angle (-pi..+pi)"]
6089    pub yaw: f32,
6090    #[doc = "Roll angular speed"]
6091    pub rollspeed: f32,
6092    #[doc = "Pitch angular speed"]
6093    pub pitchspeed: f32,
6094    #[doc = "Yaw angular speed"]
6095    pub yawspeed: f32,
6096}
6097impl ATTITUDE_DATA {
6098    pub const ENCODED_LEN: usize = 28usize;
6099    pub const DEFAULT: Self = Self {
6100        time_boot_ms: 0_u32,
6101        roll: 0.0_f32,
6102        pitch: 0.0_f32,
6103        yaw: 0.0_f32,
6104        rollspeed: 0.0_f32,
6105        pitchspeed: 0.0_f32,
6106        yawspeed: 0.0_f32,
6107    };
6108    #[cfg(feature = "arbitrary")]
6109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6110        use arbitrary::{Arbitrary, Unstructured};
6111        let mut buf = [0u8; 1024];
6112        rng.fill_bytes(&mut buf);
6113        let mut unstructured = Unstructured::new(&buf);
6114        Self::arbitrary(&mut unstructured).unwrap_or_default()
6115    }
6116}
6117impl Default for ATTITUDE_DATA {
6118    fn default() -> Self {
6119        Self::DEFAULT.clone()
6120    }
6121}
6122impl MessageData for ATTITUDE_DATA {
6123    type Message = MavMessage;
6124    const ID: u32 = 30u32;
6125    const NAME: &'static str = "ATTITUDE";
6126    const EXTRA_CRC: u8 = 39u8;
6127    const ENCODED_LEN: usize = 28usize;
6128    fn deser(
6129        _version: MavlinkVersion,
6130        __input: &[u8],
6131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6132        let avail_len = __input.len();
6133        let mut payload_buf = [0; Self::ENCODED_LEN];
6134        let mut buf = if avail_len < Self::ENCODED_LEN {
6135            payload_buf[0..avail_len].copy_from_slice(__input);
6136            Bytes::new(&payload_buf)
6137        } else {
6138            Bytes::new(__input)
6139        };
6140        let mut __struct = Self::default();
6141        __struct.time_boot_ms = buf.get_u32_le();
6142        __struct.roll = buf.get_f32_le();
6143        __struct.pitch = buf.get_f32_le();
6144        __struct.yaw = buf.get_f32_le();
6145        __struct.rollspeed = buf.get_f32_le();
6146        __struct.pitchspeed = buf.get_f32_le();
6147        __struct.yawspeed = buf.get_f32_le();
6148        Ok(__struct)
6149    }
6150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6151        let mut __tmp = BytesMut::new(bytes);
6152        #[allow(clippy::absurd_extreme_comparisons)]
6153        #[allow(unused_comparisons)]
6154        if __tmp.remaining() < Self::ENCODED_LEN {
6155            panic!(
6156                "buffer is too small (need {} bytes, but got {})",
6157                Self::ENCODED_LEN,
6158                __tmp.remaining(),
6159            )
6160        }
6161        __tmp.put_u32_le(self.time_boot_ms);
6162        __tmp.put_f32_le(self.roll);
6163        __tmp.put_f32_le(self.pitch);
6164        __tmp.put_f32_le(self.yaw);
6165        __tmp.put_f32_le(self.rollspeed);
6166        __tmp.put_f32_le(self.pitchspeed);
6167        __tmp.put_f32_le(self.yawspeed);
6168        if matches!(version, MavlinkVersion::V2) {
6169            let len = __tmp.len();
6170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6171        } else {
6172            __tmp.len()
6173        }
6174    }
6175}
6176#[doc = "id: 243"]
6177#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
6178#[derive(Debug, Clone, PartialEq)]
6179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6181pub struct SET_HOME_POSITION_DATA {
6182    #[doc = "Latitude (WGS84)"]
6183    pub latitude: i32,
6184    #[doc = "Longitude (WGS84)"]
6185    pub longitude: i32,
6186    #[doc = "Altitude (MSL). Positive for up."]
6187    pub altitude: i32,
6188    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
6189    pub x: f32,
6190    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
6191    pub y: f32,
6192    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
6193    pub z: f32,
6194    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
6195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6196    pub q: [f32; 4],
6197    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
6198    pub approach_x: f32,
6199    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
6200    pub approach_y: f32,
6201    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
6202    pub approach_z: f32,
6203    #[doc = "System ID."]
6204    pub target_system: u8,
6205    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6206    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6207    pub time_usec: u64,
6208}
6209impl SET_HOME_POSITION_DATA {
6210    pub const ENCODED_LEN: usize = 61usize;
6211    pub const DEFAULT: Self = Self {
6212        latitude: 0_i32,
6213        longitude: 0_i32,
6214        altitude: 0_i32,
6215        x: 0.0_f32,
6216        y: 0.0_f32,
6217        z: 0.0_f32,
6218        q: [0.0_f32; 4usize],
6219        approach_x: 0.0_f32,
6220        approach_y: 0.0_f32,
6221        approach_z: 0.0_f32,
6222        target_system: 0_u8,
6223        time_usec: 0_u64,
6224    };
6225    #[cfg(feature = "arbitrary")]
6226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6227        use arbitrary::{Arbitrary, Unstructured};
6228        let mut buf = [0u8; 1024];
6229        rng.fill_bytes(&mut buf);
6230        let mut unstructured = Unstructured::new(&buf);
6231        Self::arbitrary(&mut unstructured).unwrap_or_default()
6232    }
6233}
6234impl Default for SET_HOME_POSITION_DATA {
6235    fn default() -> Self {
6236        Self::DEFAULT.clone()
6237    }
6238}
6239impl MessageData for SET_HOME_POSITION_DATA {
6240    type Message = MavMessage;
6241    const ID: u32 = 243u32;
6242    const NAME: &'static str = "SET_HOME_POSITION";
6243    const EXTRA_CRC: u8 = 85u8;
6244    const ENCODED_LEN: usize = 61usize;
6245    fn deser(
6246        _version: MavlinkVersion,
6247        __input: &[u8],
6248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6249        let avail_len = __input.len();
6250        let mut payload_buf = [0; Self::ENCODED_LEN];
6251        let mut buf = if avail_len < Self::ENCODED_LEN {
6252            payload_buf[0..avail_len].copy_from_slice(__input);
6253            Bytes::new(&payload_buf)
6254        } else {
6255            Bytes::new(__input)
6256        };
6257        let mut __struct = Self::default();
6258        __struct.latitude = buf.get_i32_le();
6259        __struct.longitude = buf.get_i32_le();
6260        __struct.altitude = buf.get_i32_le();
6261        __struct.x = buf.get_f32_le();
6262        __struct.y = buf.get_f32_le();
6263        __struct.z = buf.get_f32_le();
6264        for v in &mut __struct.q {
6265            let val = buf.get_f32_le();
6266            *v = val;
6267        }
6268        __struct.approach_x = buf.get_f32_le();
6269        __struct.approach_y = buf.get_f32_le();
6270        __struct.approach_z = buf.get_f32_le();
6271        __struct.target_system = buf.get_u8();
6272        __struct.time_usec = buf.get_u64_le();
6273        Ok(__struct)
6274    }
6275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6276        let mut __tmp = BytesMut::new(bytes);
6277        #[allow(clippy::absurd_extreme_comparisons)]
6278        #[allow(unused_comparisons)]
6279        if __tmp.remaining() < Self::ENCODED_LEN {
6280            panic!(
6281                "buffer is too small (need {} bytes, but got {})",
6282                Self::ENCODED_LEN,
6283                __tmp.remaining(),
6284            )
6285        }
6286        __tmp.put_i32_le(self.latitude);
6287        __tmp.put_i32_le(self.longitude);
6288        __tmp.put_i32_le(self.altitude);
6289        __tmp.put_f32_le(self.x);
6290        __tmp.put_f32_le(self.y);
6291        __tmp.put_f32_le(self.z);
6292        for val in &self.q {
6293            __tmp.put_f32_le(*val);
6294        }
6295        __tmp.put_f32_le(self.approach_x);
6296        __tmp.put_f32_le(self.approach_y);
6297        __tmp.put_f32_le(self.approach_z);
6298        __tmp.put_u8(self.target_system);
6299        __tmp.put_u64_le(self.time_usec);
6300        if matches!(version, MavlinkVersion::V2) {
6301            let len = __tmp.len();
6302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6303        } else {
6304            __tmp.len()
6305        }
6306    }
6307}
6308#[doc = "id: 373"]
6309#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
6310#[derive(Debug, Clone, PartialEq)]
6311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6313pub struct GENERATOR_STATUS_DATA {
6314    #[doc = "Status flags."]
6315    pub status: MavGeneratorStatusFlag,
6316    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
6317    pub battery_current: f32,
6318    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
6319    pub load_current: f32,
6320    #[doc = "The power being generated. NaN: field not provided"]
6321    pub power_generated: f32,
6322    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
6323    pub bus_voltage: f32,
6324    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
6325    pub bat_current_setpoint: f32,
6326    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
6327    pub runtime: u32,
6328    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
6329    pub time_until_maintenance: i32,
6330    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
6331    pub generator_speed: u16,
6332    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
6333    pub rectifier_temperature: i16,
6334    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
6335    pub generator_temperature: i16,
6336}
6337impl GENERATOR_STATUS_DATA {
6338    pub const ENCODED_LEN: usize = 42usize;
6339    pub const DEFAULT: Self = Self {
6340        status: MavGeneratorStatusFlag::DEFAULT,
6341        battery_current: 0.0_f32,
6342        load_current: 0.0_f32,
6343        power_generated: 0.0_f32,
6344        bus_voltage: 0.0_f32,
6345        bat_current_setpoint: 0.0_f32,
6346        runtime: 0_u32,
6347        time_until_maintenance: 0_i32,
6348        generator_speed: 0_u16,
6349        rectifier_temperature: 0_i16,
6350        generator_temperature: 0_i16,
6351    };
6352    #[cfg(feature = "arbitrary")]
6353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6354        use arbitrary::{Arbitrary, Unstructured};
6355        let mut buf = [0u8; 1024];
6356        rng.fill_bytes(&mut buf);
6357        let mut unstructured = Unstructured::new(&buf);
6358        Self::arbitrary(&mut unstructured).unwrap_or_default()
6359    }
6360}
6361impl Default for GENERATOR_STATUS_DATA {
6362    fn default() -> Self {
6363        Self::DEFAULT.clone()
6364    }
6365}
6366impl MessageData for GENERATOR_STATUS_DATA {
6367    type Message = MavMessage;
6368    const ID: u32 = 373u32;
6369    const NAME: &'static str = "GENERATOR_STATUS";
6370    const EXTRA_CRC: u8 = 117u8;
6371    const ENCODED_LEN: usize = 42usize;
6372    fn deser(
6373        _version: MavlinkVersion,
6374        __input: &[u8],
6375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6376        let avail_len = __input.len();
6377        let mut payload_buf = [0; Self::ENCODED_LEN];
6378        let mut buf = if avail_len < Self::ENCODED_LEN {
6379            payload_buf[0..avail_len].copy_from_slice(__input);
6380            Bytes::new(&payload_buf)
6381        } else {
6382            Bytes::new(__input)
6383        };
6384        let mut __struct = Self::default();
6385        let tmp = buf.get_u64_le();
6386        __struct.status = MavGeneratorStatusFlag::from_bits(
6387            tmp & MavGeneratorStatusFlag::all().bits(),
6388        )
6389        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6390            flag_type: "MavGeneratorStatusFlag",
6391            value: tmp as u32,
6392        })?;
6393        __struct.battery_current = buf.get_f32_le();
6394        __struct.load_current = buf.get_f32_le();
6395        __struct.power_generated = buf.get_f32_le();
6396        __struct.bus_voltage = buf.get_f32_le();
6397        __struct.bat_current_setpoint = buf.get_f32_le();
6398        __struct.runtime = buf.get_u32_le();
6399        __struct.time_until_maintenance = buf.get_i32_le();
6400        __struct.generator_speed = buf.get_u16_le();
6401        __struct.rectifier_temperature = buf.get_i16_le();
6402        __struct.generator_temperature = buf.get_i16_le();
6403        Ok(__struct)
6404    }
6405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6406        let mut __tmp = BytesMut::new(bytes);
6407        #[allow(clippy::absurd_extreme_comparisons)]
6408        #[allow(unused_comparisons)]
6409        if __tmp.remaining() < Self::ENCODED_LEN {
6410            panic!(
6411                "buffer is too small (need {} bytes, but got {})",
6412                Self::ENCODED_LEN,
6413                __tmp.remaining(),
6414            )
6415        }
6416        __tmp.put_u64_le(self.status.bits());
6417        __tmp.put_f32_le(self.battery_current);
6418        __tmp.put_f32_le(self.load_current);
6419        __tmp.put_f32_le(self.power_generated);
6420        __tmp.put_f32_le(self.bus_voltage);
6421        __tmp.put_f32_le(self.bat_current_setpoint);
6422        __tmp.put_u32_le(self.runtime);
6423        __tmp.put_i32_le(self.time_until_maintenance);
6424        __tmp.put_u16_le(self.generator_speed);
6425        __tmp.put_i16_le(self.rectifier_temperature);
6426        __tmp.put_i16_le(self.generator_temperature);
6427        if matches!(version, MavlinkVersion::V2) {
6428            let len = __tmp.len();
6429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6430        } else {
6431            __tmp.len()
6432        }
6433    }
6434}
6435#[doc = "id: 283"]
6436#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
6437#[derive(Debug, Clone, PartialEq)]
6438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6440pub struct GIMBAL_DEVICE_INFORMATION_DATA {
6441    #[doc = "UID of gimbal hardware (0 if unknown)."]
6442    pub uid: u64,
6443    #[doc = "Timestamp (time since system boot)."]
6444    pub time_boot_ms: u32,
6445    #[doc = "0xff)."]
6446    pub firmware_version: u32,
6447    #[doc = "0xff)."]
6448    pub hardware_version: u32,
6449    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
6450    pub roll_min: f32,
6451    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
6452    pub roll_max: f32,
6453    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
6454    pub pitch_min: f32,
6455    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
6456    pub pitch_max: f32,
6457    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
6458    pub yaw_min: f32,
6459    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
6460    pub yaw_max: f32,
6461    #[doc = "Bitmap of gimbal capability flags."]
6462    pub cap_flags: GimbalDeviceCapFlags,
6463    #[doc = "Bitmap for use for gimbal-specific capability flags."]
6464    pub custom_cap_flags: u16,
6465    #[doc = "Name of the gimbal vendor."]
6466    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6467    pub vendor_name: [u8; 32],
6468    #[doc = "Name of the gimbal model."]
6469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6470    pub model_name: [u8; 32],
6471    #[doc = "Custom name of the gimbal given to it by the user."]
6472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6473    pub custom_name: [u8; 32],
6474    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
6475    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6476    pub gimbal_device_id: u8,
6477}
6478impl GIMBAL_DEVICE_INFORMATION_DATA {
6479    pub const ENCODED_LEN: usize = 145usize;
6480    pub const DEFAULT: Self = Self {
6481        uid: 0_u64,
6482        time_boot_ms: 0_u32,
6483        firmware_version: 0_u32,
6484        hardware_version: 0_u32,
6485        roll_min: 0.0_f32,
6486        roll_max: 0.0_f32,
6487        pitch_min: 0.0_f32,
6488        pitch_max: 0.0_f32,
6489        yaw_min: 0.0_f32,
6490        yaw_max: 0.0_f32,
6491        cap_flags: GimbalDeviceCapFlags::DEFAULT,
6492        custom_cap_flags: 0_u16,
6493        vendor_name: [0_u8; 32usize],
6494        model_name: [0_u8; 32usize],
6495        custom_name: [0_u8; 32usize],
6496        gimbal_device_id: 0_u8,
6497    };
6498    #[cfg(feature = "arbitrary")]
6499    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6500        use arbitrary::{Arbitrary, Unstructured};
6501        let mut buf = [0u8; 1024];
6502        rng.fill_bytes(&mut buf);
6503        let mut unstructured = Unstructured::new(&buf);
6504        Self::arbitrary(&mut unstructured).unwrap_or_default()
6505    }
6506}
6507impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
6508    fn default() -> Self {
6509        Self::DEFAULT.clone()
6510    }
6511}
6512impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
6513    type Message = MavMessage;
6514    const ID: u32 = 283u32;
6515    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
6516    const EXTRA_CRC: u8 = 74u8;
6517    const ENCODED_LEN: usize = 145usize;
6518    fn deser(
6519        _version: MavlinkVersion,
6520        __input: &[u8],
6521    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6522        let avail_len = __input.len();
6523        let mut payload_buf = [0; Self::ENCODED_LEN];
6524        let mut buf = if avail_len < Self::ENCODED_LEN {
6525            payload_buf[0..avail_len].copy_from_slice(__input);
6526            Bytes::new(&payload_buf)
6527        } else {
6528            Bytes::new(__input)
6529        };
6530        let mut __struct = Self::default();
6531        __struct.uid = buf.get_u64_le();
6532        __struct.time_boot_ms = buf.get_u32_le();
6533        __struct.firmware_version = buf.get_u32_le();
6534        __struct.hardware_version = buf.get_u32_le();
6535        __struct.roll_min = buf.get_f32_le();
6536        __struct.roll_max = buf.get_f32_le();
6537        __struct.pitch_min = buf.get_f32_le();
6538        __struct.pitch_max = buf.get_f32_le();
6539        __struct.yaw_min = buf.get_f32_le();
6540        __struct.yaw_max = buf.get_f32_le();
6541        let tmp = buf.get_u16_le();
6542        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
6543            tmp & GimbalDeviceCapFlags::all().bits(),
6544        )
6545        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6546            flag_type: "GimbalDeviceCapFlags",
6547            value: tmp as u32,
6548        })?;
6549        __struct.custom_cap_flags = buf.get_u16_le();
6550        for v in &mut __struct.vendor_name {
6551            let val = buf.get_u8();
6552            *v = val;
6553        }
6554        for v in &mut __struct.model_name {
6555            let val = buf.get_u8();
6556            *v = val;
6557        }
6558        for v in &mut __struct.custom_name {
6559            let val = buf.get_u8();
6560            *v = val;
6561        }
6562        __struct.gimbal_device_id = buf.get_u8();
6563        Ok(__struct)
6564    }
6565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6566        let mut __tmp = BytesMut::new(bytes);
6567        #[allow(clippy::absurd_extreme_comparisons)]
6568        #[allow(unused_comparisons)]
6569        if __tmp.remaining() < Self::ENCODED_LEN {
6570            panic!(
6571                "buffer is too small (need {} bytes, but got {})",
6572                Self::ENCODED_LEN,
6573                __tmp.remaining(),
6574            )
6575        }
6576        __tmp.put_u64_le(self.uid);
6577        __tmp.put_u32_le(self.time_boot_ms);
6578        __tmp.put_u32_le(self.firmware_version);
6579        __tmp.put_u32_le(self.hardware_version);
6580        __tmp.put_f32_le(self.roll_min);
6581        __tmp.put_f32_le(self.roll_max);
6582        __tmp.put_f32_le(self.pitch_min);
6583        __tmp.put_f32_le(self.pitch_max);
6584        __tmp.put_f32_le(self.yaw_min);
6585        __tmp.put_f32_le(self.yaw_max);
6586        __tmp.put_u16_le(self.cap_flags.bits());
6587        __tmp.put_u16_le(self.custom_cap_flags);
6588        for val in &self.vendor_name {
6589            __tmp.put_u8(*val);
6590        }
6591        for val in &self.model_name {
6592            __tmp.put_u8(*val);
6593        }
6594        for val in &self.custom_name {
6595            __tmp.put_u8(*val);
6596        }
6597        __tmp.put_u8(self.gimbal_device_id);
6598        if matches!(version, MavlinkVersion::V2) {
6599            let len = __tmp.len();
6600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6601        } else {
6602            __tmp.len()
6603        }
6604    }
6605}
6606#[doc = "id: 234"]
6607#[doc = "Message appropriate for high latency connections like Iridium."]
6608#[derive(Debug, Clone, PartialEq)]
6609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6611pub struct HIGH_LATENCY_DATA {
6612    #[doc = "A bitfield for use for autopilot-specific flags."]
6613    pub custom_mode: u32,
6614    #[doc = "Latitude"]
6615    pub latitude: i32,
6616    #[doc = "Longitude"]
6617    pub longitude: i32,
6618    #[doc = "roll"]
6619    pub roll: i16,
6620    #[doc = "pitch"]
6621    pub pitch: i16,
6622    #[doc = "heading"]
6623    pub heading: u16,
6624    #[doc = "heading setpoint"]
6625    pub heading_sp: i16,
6626    #[doc = "Altitude above mean sea level"]
6627    pub altitude_amsl: i16,
6628    #[doc = "Altitude setpoint relative to the home position"]
6629    pub altitude_sp: i16,
6630    #[doc = "distance to target"]
6631    pub wp_distance: u16,
6632    #[doc = "Bitmap of enabled system modes."]
6633    pub base_mode: MavModeFlag,
6634    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6635    pub landed_state: MavLandedState,
6636    #[doc = "throttle (percentage)"]
6637    pub throttle: i8,
6638    #[doc = "airspeed"]
6639    pub airspeed: u8,
6640    #[doc = "airspeed setpoint"]
6641    pub airspeed_sp: u8,
6642    #[doc = "groundspeed"]
6643    pub groundspeed: u8,
6644    #[doc = "climb rate"]
6645    pub climb_rate: i8,
6646    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
6647    pub gps_nsat: u8,
6648    #[doc = "GPS Fix type."]
6649    pub gps_fix_type: GpsFixType,
6650    #[doc = "Remaining battery (percentage)"]
6651    pub battery_remaining: u8,
6652    #[doc = "Autopilot temperature (degrees C)"]
6653    pub temperature: i8,
6654    #[doc = "Air temperature (degrees C) from airspeed sensor"]
6655    pub temperature_air: i8,
6656    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
6657    pub failsafe: u8,
6658    #[doc = "current waypoint number"]
6659    pub wp_num: u8,
6660}
6661impl HIGH_LATENCY_DATA {
6662    pub const ENCODED_LEN: usize = 40usize;
6663    pub const DEFAULT: Self = Self {
6664        custom_mode: 0_u32,
6665        latitude: 0_i32,
6666        longitude: 0_i32,
6667        roll: 0_i16,
6668        pitch: 0_i16,
6669        heading: 0_u16,
6670        heading_sp: 0_i16,
6671        altitude_amsl: 0_i16,
6672        altitude_sp: 0_i16,
6673        wp_distance: 0_u16,
6674        base_mode: MavModeFlag::DEFAULT,
6675        landed_state: MavLandedState::DEFAULT,
6676        throttle: 0_i8,
6677        airspeed: 0_u8,
6678        airspeed_sp: 0_u8,
6679        groundspeed: 0_u8,
6680        climb_rate: 0_i8,
6681        gps_nsat: 0_u8,
6682        gps_fix_type: GpsFixType::DEFAULT,
6683        battery_remaining: 0_u8,
6684        temperature: 0_i8,
6685        temperature_air: 0_i8,
6686        failsafe: 0_u8,
6687        wp_num: 0_u8,
6688    };
6689    #[cfg(feature = "arbitrary")]
6690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6691        use arbitrary::{Arbitrary, Unstructured};
6692        let mut buf = [0u8; 1024];
6693        rng.fill_bytes(&mut buf);
6694        let mut unstructured = Unstructured::new(&buf);
6695        Self::arbitrary(&mut unstructured).unwrap_or_default()
6696    }
6697}
6698impl Default for HIGH_LATENCY_DATA {
6699    fn default() -> Self {
6700        Self::DEFAULT.clone()
6701    }
6702}
6703impl MessageData for HIGH_LATENCY_DATA {
6704    type Message = MavMessage;
6705    const ID: u32 = 234u32;
6706    const NAME: &'static str = "HIGH_LATENCY";
6707    const EXTRA_CRC: u8 = 150u8;
6708    const ENCODED_LEN: usize = 40usize;
6709    fn deser(
6710        _version: MavlinkVersion,
6711        __input: &[u8],
6712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6713        let avail_len = __input.len();
6714        let mut payload_buf = [0; Self::ENCODED_LEN];
6715        let mut buf = if avail_len < Self::ENCODED_LEN {
6716            payload_buf[0..avail_len].copy_from_slice(__input);
6717            Bytes::new(&payload_buf)
6718        } else {
6719            Bytes::new(__input)
6720        };
6721        let mut __struct = Self::default();
6722        __struct.custom_mode = buf.get_u32_le();
6723        __struct.latitude = buf.get_i32_le();
6724        __struct.longitude = buf.get_i32_le();
6725        __struct.roll = buf.get_i16_le();
6726        __struct.pitch = buf.get_i16_le();
6727        __struct.heading = buf.get_u16_le();
6728        __struct.heading_sp = buf.get_i16_le();
6729        __struct.altitude_amsl = buf.get_i16_le();
6730        __struct.altitude_sp = buf.get_i16_le();
6731        __struct.wp_distance = buf.get_u16_le();
6732        let tmp = buf.get_u8();
6733        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
6734            ::mavlink_core::error::ParserError::InvalidFlag {
6735                flag_type: "MavModeFlag",
6736                value: tmp as u32,
6737            },
6738        )?;
6739        let tmp = buf.get_u8();
6740        __struct.landed_state =
6741            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6742                enum_type: "MavLandedState",
6743                value: tmp as u32,
6744            })?;
6745        __struct.throttle = buf.get_i8();
6746        __struct.airspeed = buf.get_u8();
6747        __struct.airspeed_sp = buf.get_u8();
6748        __struct.groundspeed = buf.get_u8();
6749        __struct.climb_rate = buf.get_i8();
6750        __struct.gps_nsat = buf.get_u8();
6751        let tmp = buf.get_u8();
6752        __struct.gps_fix_type =
6753            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6754                enum_type: "GpsFixType",
6755                value: tmp as u32,
6756            })?;
6757        __struct.battery_remaining = buf.get_u8();
6758        __struct.temperature = buf.get_i8();
6759        __struct.temperature_air = buf.get_i8();
6760        __struct.failsafe = buf.get_u8();
6761        __struct.wp_num = buf.get_u8();
6762        Ok(__struct)
6763    }
6764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6765        let mut __tmp = BytesMut::new(bytes);
6766        #[allow(clippy::absurd_extreme_comparisons)]
6767        #[allow(unused_comparisons)]
6768        if __tmp.remaining() < Self::ENCODED_LEN {
6769            panic!(
6770                "buffer is too small (need {} bytes, but got {})",
6771                Self::ENCODED_LEN,
6772                __tmp.remaining(),
6773            )
6774        }
6775        __tmp.put_u32_le(self.custom_mode);
6776        __tmp.put_i32_le(self.latitude);
6777        __tmp.put_i32_le(self.longitude);
6778        __tmp.put_i16_le(self.roll);
6779        __tmp.put_i16_le(self.pitch);
6780        __tmp.put_u16_le(self.heading);
6781        __tmp.put_i16_le(self.heading_sp);
6782        __tmp.put_i16_le(self.altitude_amsl);
6783        __tmp.put_i16_le(self.altitude_sp);
6784        __tmp.put_u16_le(self.wp_distance);
6785        __tmp.put_u8(self.base_mode.bits());
6786        __tmp.put_u8(self.landed_state as u8);
6787        __tmp.put_i8(self.throttle);
6788        __tmp.put_u8(self.airspeed);
6789        __tmp.put_u8(self.airspeed_sp);
6790        __tmp.put_u8(self.groundspeed);
6791        __tmp.put_i8(self.climb_rate);
6792        __tmp.put_u8(self.gps_nsat);
6793        __tmp.put_u8(self.gps_fix_type as u8);
6794        __tmp.put_u8(self.battery_remaining);
6795        __tmp.put_i8(self.temperature);
6796        __tmp.put_i8(self.temperature_air);
6797        __tmp.put_u8(self.failsafe);
6798        __tmp.put_u8(self.wp_num);
6799        if matches!(version, MavlinkVersion::V2) {
6800            let len = __tmp.len();
6801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6802        } else {
6803            __tmp.len()
6804        }
6805    }
6806}
6807#[doc = "id: 258"]
6808#[doc = "Control vehicle tone generation (buzzer)."]
6809#[derive(Debug, Clone, PartialEq)]
6810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6812pub struct PLAY_TUNE_DATA {
6813    #[doc = "System ID"]
6814    pub target_system: u8,
6815    #[doc = "Component ID"]
6816    pub target_component: u8,
6817    #[doc = "tune in board specific format"]
6818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6819    pub tune: [u8; 30],
6820    #[doc = "tune extension (appended to tune)"]
6821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6823    pub tune2: [u8; 200],
6824}
6825impl PLAY_TUNE_DATA {
6826    pub const ENCODED_LEN: usize = 232usize;
6827    pub const DEFAULT: Self = Self {
6828        target_system: 0_u8,
6829        target_component: 0_u8,
6830        tune: [0_u8; 30usize],
6831        tune2: [0_u8; 200usize],
6832    };
6833    #[cfg(feature = "arbitrary")]
6834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6835        use arbitrary::{Arbitrary, Unstructured};
6836        let mut buf = [0u8; 1024];
6837        rng.fill_bytes(&mut buf);
6838        let mut unstructured = Unstructured::new(&buf);
6839        Self::arbitrary(&mut unstructured).unwrap_or_default()
6840    }
6841}
6842impl Default for PLAY_TUNE_DATA {
6843    fn default() -> Self {
6844        Self::DEFAULT.clone()
6845    }
6846}
6847impl MessageData for PLAY_TUNE_DATA {
6848    type Message = MavMessage;
6849    const ID: u32 = 258u32;
6850    const NAME: &'static str = "PLAY_TUNE";
6851    const EXTRA_CRC: u8 = 187u8;
6852    const ENCODED_LEN: usize = 232usize;
6853    fn deser(
6854        _version: MavlinkVersion,
6855        __input: &[u8],
6856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6857        let avail_len = __input.len();
6858        let mut payload_buf = [0; Self::ENCODED_LEN];
6859        let mut buf = if avail_len < Self::ENCODED_LEN {
6860            payload_buf[0..avail_len].copy_from_slice(__input);
6861            Bytes::new(&payload_buf)
6862        } else {
6863            Bytes::new(__input)
6864        };
6865        let mut __struct = Self::default();
6866        __struct.target_system = buf.get_u8();
6867        __struct.target_component = buf.get_u8();
6868        for v in &mut __struct.tune {
6869            let val = buf.get_u8();
6870            *v = val;
6871        }
6872        for v in &mut __struct.tune2 {
6873            let val = buf.get_u8();
6874            *v = val;
6875        }
6876        Ok(__struct)
6877    }
6878    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6879        let mut __tmp = BytesMut::new(bytes);
6880        #[allow(clippy::absurd_extreme_comparisons)]
6881        #[allow(unused_comparisons)]
6882        if __tmp.remaining() < Self::ENCODED_LEN {
6883            panic!(
6884                "buffer is too small (need {} bytes, but got {})",
6885                Self::ENCODED_LEN,
6886                __tmp.remaining(),
6887            )
6888        }
6889        __tmp.put_u8(self.target_system);
6890        __tmp.put_u8(self.target_component);
6891        for val in &self.tune {
6892            __tmp.put_u8(*val);
6893        }
6894        for val in &self.tune2 {
6895            __tmp.put_u8(*val);
6896        }
6897        if matches!(version, MavlinkVersion::V2) {
6898            let len = __tmp.len();
6899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6900        } else {
6901            __tmp.len()
6902        }
6903    }
6904}
6905#[doc = "id: 137"]
6906#[doc = "Barometer readings for 2nd barometer."]
6907#[derive(Debug, Clone, PartialEq)]
6908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6910pub struct SCALED_PRESSURE2_DATA {
6911    #[doc = "Timestamp (time since system boot)."]
6912    pub time_boot_ms: u32,
6913    #[doc = "Absolute pressure"]
6914    pub press_abs: f32,
6915    #[doc = "Differential pressure"]
6916    pub press_diff: f32,
6917    #[doc = "Absolute pressure temperature"]
6918    pub temperature: i16,
6919    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
6920    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6921    pub temperature_press_diff: i16,
6922}
6923impl SCALED_PRESSURE2_DATA {
6924    pub const ENCODED_LEN: usize = 16usize;
6925    pub const DEFAULT: Self = Self {
6926        time_boot_ms: 0_u32,
6927        press_abs: 0.0_f32,
6928        press_diff: 0.0_f32,
6929        temperature: 0_i16,
6930        temperature_press_diff: 0_i16,
6931    };
6932    #[cfg(feature = "arbitrary")]
6933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6934        use arbitrary::{Arbitrary, Unstructured};
6935        let mut buf = [0u8; 1024];
6936        rng.fill_bytes(&mut buf);
6937        let mut unstructured = Unstructured::new(&buf);
6938        Self::arbitrary(&mut unstructured).unwrap_or_default()
6939    }
6940}
6941impl Default for SCALED_PRESSURE2_DATA {
6942    fn default() -> Self {
6943        Self::DEFAULT.clone()
6944    }
6945}
6946impl MessageData for SCALED_PRESSURE2_DATA {
6947    type Message = MavMessage;
6948    const ID: u32 = 137u32;
6949    const NAME: &'static str = "SCALED_PRESSURE2";
6950    const EXTRA_CRC: u8 = 195u8;
6951    const ENCODED_LEN: usize = 16usize;
6952    fn deser(
6953        _version: MavlinkVersion,
6954        __input: &[u8],
6955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6956        let avail_len = __input.len();
6957        let mut payload_buf = [0; Self::ENCODED_LEN];
6958        let mut buf = if avail_len < Self::ENCODED_LEN {
6959            payload_buf[0..avail_len].copy_from_slice(__input);
6960            Bytes::new(&payload_buf)
6961        } else {
6962            Bytes::new(__input)
6963        };
6964        let mut __struct = Self::default();
6965        __struct.time_boot_ms = buf.get_u32_le();
6966        __struct.press_abs = buf.get_f32_le();
6967        __struct.press_diff = buf.get_f32_le();
6968        __struct.temperature = buf.get_i16_le();
6969        __struct.temperature_press_diff = buf.get_i16_le();
6970        Ok(__struct)
6971    }
6972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6973        let mut __tmp = BytesMut::new(bytes);
6974        #[allow(clippy::absurd_extreme_comparisons)]
6975        #[allow(unused_comparisons)]
6976        if __tmp.remaining() < Self::ENCODED_LEN {
6977            panic!(
6978                "buffer is too small (need {} bytes, but got {})",
6979                Self::ENCODED_LEN,
6980                __tmp.remaining(),
6981            )
6982        }
6983        __tmp.put_u32_le(self.time_boot_ms);
6984        __tmp.put_f32_le(self.press_abs);
6985        __tmp.put_f32_le(self.press_diff);
6986        __tmp.put_i16_le(self.temperature);
6987        __tmp.put_i16_le(self.temperature_press_diff);
6988        if matches!(version, MavlinkVersion::V2) {
6989            let len = __tmp.len();
6990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6991        } else {
6992            __tmp.len()
6993        }
6994    }
6995}
6996#[doc = "id: 276"]
6997#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
6998#[derive(Debug, Clone, PartialEq)]
6999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7001pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7002    #[doc = "Latitude of tracked object"]
7003    pub lat: i32,
7004    #[doc = "Longitude of tracked object"]
7005    pub lon: i32,
7006    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7007    pub alt: f32,
7008    #[doc = "Horizontal accuracy. NAN if unknown"]
7009    pub h_acc: f32,
7010    #[doc = "Vertical accuracy. NAN if unknown"]
7011    pub v_acc: f32,
7012    #[doc = "North velocity of tracked object. NAN if unknown"]
7013    pub vel_n: f32,
7014    #[doc = "East velocity of tracked object. NAN if unknown"]
7015    pub vel_e: f32,
7016    #[doc = "Down velocity of tracked object. NAN if unknown"]
7017    pub vel_d: f32,
7018    #[doc = "Velocity accuracy. NAN if unknown"]
7019    pub vel_acc: f32,
7020    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7021    pub dist: f32,
7022    #[doc = "Heading in radians, in NED. NAN if unknown"]
7023    pub hdg: f32,
7024    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7025    pub hdg_acc: f32,
7026    #[doc = "Current tracking status"]
7027    pub tracking_status: CameraTrackingStatusFlags,
7028    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7029    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7030    pub camera_device_id: u8,
7031}
7032impl CAMERA_TRACKING_GEO_STATUS_DATA {
7033    pub const ENCODED_LEN: usize = 50usize;
7034    pub const DEFAULT: Self = Self {
7035        lat: 0_i32,
7036        lon: 0_i32,
7037        alt: 0.0_f32,
7038        h_acc: 0.0_f32,
7039        v_acc: 0.0_f32,
7040        vel_n: 0.0_f32,
7041        vel_e: 0.0_f32,
7042        vel_d: 0.0_f32,
7043        vel_acc: 0.0_f32,
7044        dist: 0.0_f32,
7045        hdg: 0.0_f32,
7046        hdg_acc: 0.0_f32,
7047        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7048        camera_device_id: 0_u8,
7049    };
7050    #[cfg(feature = "arbitrary")]
7051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7052        use arbitrary::{Arbitrary, Unstructured};
7053        let mut buf = [0u8; 1024];
7054        rng.fill_bytes(&mut buf);
7055        let mut unstructured = Unstructured::new(&buf);
7056        Self::arbitrary(&mut unstructured).unwrap_or_default()
7057    }
7058}
7059impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7060    fn default() -> Self {
7061        Self::DEFAULT.clone()
7062    }
7063}
7064impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7065    type Message = MavMessage;
7066    const ID: u32 = 276u32;
7067    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7068    const EXTRA_CRC: u8 = 18u8;
7069    const ENCODED_LEN: usize = 50usize;
7070    fn deser(
7071        _version: MavlinkVersion,
7072        __input: &[u8],
7073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7074        let avail_len = __input.len();
7075        let mut payload_buf = [0; Self::ENCODED_LEN];
7076        let mut buf = if avail_len < Self::ENCODED_LEN {
7077            payload_buf[0..avail_len].copy_from_slice(__input);
7078            Bytes::new(&payload_buf)
7079        } else {
7080            Bytes::new(__input)
7081        };
7082        let mut __struct = Self::default();
7083        __struct.lat = buf.get_i32_le();
7084        __struct.lon = buf.get_i32_le();
7085        __struct.alt = buf.get_f32_le();
7086        __struct.h_acc = buf.get_f32_le();
7087        __struct.v_acc = buf.get_f32_le();
7088        __struct.vel_n = buf.get_f32_le();
7089        __struct.vel_e = buf.get_f32_le();
7090        __struct.vel_d = buf.get_f32_le();
7091        __struct.vel_acc = buf.get_f32_le();
7092        __struct.dist = buf.get_f32_le();
7093        __struct.hdg = buf.get_f32_le();
7094        __struct.hdg_acc = buf.get_f32_le();
7095        let tmp = buf.get_u8();
7096        __struct.tracking_status =
7097            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7098                enum_type: "CameraTrackingStatusFlags",
7099                value: tmp as u32,
7100            })?;
7101        __struct.camera_device_id = buf.get_u8();
7102        Ok(__struct)
7103    }
7104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7105        let mut __tmp = BytesMut::new(bytes);
7106        #[allow(clippy::absurd_extreme_comparisons)]
7107        #[allow(unused_comparisons)]
7108        if __tmp.remaining() < Self::ENCODED_LEN {
7109            panic!(
7110                "buffer is too small (need {} bytes, but got {})",
7111                Self::ENCODED_LEN,
7112                __tmp.remaining(),
7113            )
7114        }
7115        __tmp.put_i32_le(self.lat);
7116        __tmp.put_i32_le(self.lon);
7117        __tmp.put_f32_le(self.alt);
7118        __tmp.put_f32_le(self.h_acc);
7119        __tmp.put_f32_le(self.v_acc);
7120        __tmp.put_f32_le(self.vel_n);
7121        __tmp.put_f32_le(self.vel_e);
7122        __tmp.put_f32_le(self.vel_d);
7123        __tmp.put_f32_le(self.vel_acc);
7124        __tmp.put_f32_le(self.dist);
7125        __tmp.put_f32_le(self.hdg);
7126        __tmp.put_f32_le(self.hdg_acc);
7127        __tmp.put_u8(self.tracking_status as u8);
7128        __tmp.put_u8(self.camera_device_id);
7129        if matches!(version, MavlinkVersion::V2) {
7130            let len = __tmp.len();
7131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7132        } else {
7133            __tmp.len()
7134        }
7135    }
7136}
7137#[doc = "id: 114"]
7138#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
7139#[derive(Debug, Clone, PartialEq)]
7140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7142pub struct HIL_OPTICAL_FLOW_DATA {
7143    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7144    pub time_usec: u64,
7145    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
7146    pub integration_time_us: u32,
7147    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
7148    pub integrated_x: f32,
7149    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
7150    pub integrated_y: f32,
7151    #[doc = "RH rotation around X axis"]
7152    pub integrated_xgyro: f32,
7153    #[doc = "RH rotation around Y axis"]
7154    pub integrated_ygyro: f32,
7155    #[doc = "RH rotation around Z axis"]
7156    pub integrated_zgyro: f32,
7157    #[doc = "Time since the distance was sampled."]
7158    pub time_delta_distance_us: u32,
7159    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
7160    pub distance: f32,
7161    #[doc = "Temperature"]
7162    pub temperature: i16,
7163    #[doc = "Sensor ID"]
7164    pub sensor_id: u8,
7165    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
7166    pub quality: u8,
7167}
7168impl HIL_OPTICAL_FLOW_DATA {
7169    pub const ENCODED_LEN: usize = 44usize;
7170    pub const DEFAULT: Self = Self {
7171        time_usec: 0_u64,
7172        integration_time_us: 0_u32,
7173        integrated_x: 0.0_f32,
7174        integrated_y: 0.0_f32,
7175        integrated_xgyro: 0.0_f32,
7176        integrated_ygyro: 0.0_f32,
7177        integrated_zgyro: 0.0_f32,
7178        time_delta_distance_us: 0_u32,
7179        distance: 0.0_f32,
7180        temperature: 0_i16,
7181        sensor_id: 0_u8,
7182        quality: 0_u8,
7183    };
7184    #[cfg(feature = "arbitrary")]
7185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7186        use arbitrary::{Arbitrary, Unstructured};
7187        let mut buf = [0u8; 1024];
7188        rng.fill_bytes(&mut buf);
7189        let mut unstructured = Unstructured::new(&buf);
7190        Self::arbitrary(&mut unstructured).unwrap_or_default()
7191    }
7192}
7193impl Default for HIL_OPTICAL_FLOW_DATA {
7194    fn default() -> Self {
7195        Self::DEFAULT.clone()
7196    }
7197}
7198impl MessageData for HIL_OPTICAL_FLOW_DATA {
7199    type Message = MavMessage;
7200    const ID: u32 = 114u32;
7201    const NAME: &'static str = "HIL_OPTICAL_FLOW";
7202    const EXTRA_CRC: u8 = 237u8;
7203    const ENCODED_LEN: usize = 44usize;
7204    fn deser(
7205        _version: MavlinkVersion,
7206        __input: &[u8],
7207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7208        let avail_len = __input.len();
7209        let mut payload_buf = [0; Self::ENCODED_LEN];
7210        let mut buf = if avail_len < Self::ENCODED_LEN {
7211            payload_buf[0..avail_len].copy_from_slice(__input);
7212            Bytes::new(&payload_buf)
7213        } else {
7214            Bytes::new(__input)
7215        };
7216        let mut __struct = Self::default();
7217        __struct.time_usec = buf.get_u64_le();
7218        __struct.integration_time_us = buf.get_u32_le();
7219        __struct.integrated_x = buf.get_f32_le();
7220        __struct.integrated_y = buf.get_f32_le();
7221        __struct.integrated_xgyro = buf.get_f32_le();
7222        __struct.integrated_ygyro = buf.get_f32_le();
7223        __struct.integrated_zgyro = buf.get_f32_le();
7224        __struct.time_delta_distance_us = buf.get_u32_le();
7225        __struct.distance = buf.get_f32_le();
7226        __struct.temperature = buf.get_i16_le();
7227        __struct.sensor_id = buf.get_u8();
7228        __struct.quality = buf.get_u8();
7229        Ok(__struct)
7230    }
7231    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7232        let mut __tmp = BytesMut::new(bytes);
7233        #[allow(clippy::absurd_extreme_comparisons)]
7234        #[allow(unused_comparisons)]
7235        if __tmp.remaining() < Self::ENCODED_LEN {
7236            panic!(
7237                "buffer is too small (need {} bytes, but got {})",
7238                Self::ENCODED_LEN,
7239                __tmp.remaining(),
7240            )
7241        }
7242        __tmp.put_u64_le(self.time_usec);
7243        __tmp.put_u32_le(self.integration_time_us);
7244        __tmp.put_f32_le(self.integrated_x);
7245        __tmp.put_f32_le(self.integrated_y);
7246        __tmp.put_f32_le(self.integrated_xgyro);
7247        __tmp.put_f32_le(self.integrated_ygyro);
7248        __tmp.put_f32_le(self.integrated_zgyro);
7249        __tmp.put_u32_le(self.time_delta_distance_us);
7250        __tmp.put_f32_le(self.distance);
7251        __tmp.put_i16_le(self.temperature);
7252        __tmp.put_u8(self.sensor_id);
7253        __tmp.put_u8(self.quality);
7254        if matches!(version, MavlinkVersion::V2) {
7255            let len = __tmp.len();
7256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7257        } else {
7258            __tmp.len()
7259        }
7260    }
7261}
7262#[doc = "id: 82"]
7263#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
7264#[derive(Debug, Clone, PartialEq)]
7265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7267pub struct SET_ATTITUDE_TARGET_DATA {
7268    #[doc = "Timestamp (time since system boot)."]
7269    pub time_boot_ms: u32,
7270    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
7271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7272    pub q: [f32; 4],
7273    #[doc = "Body roll rate"]
7274    pub body_roll_rate: f32,
7275    #[doc = "Body pitch rate"]
7276    pub body_pitch_rate: f32,
7277    #[doc = "Body yaw rate"]
7278    pub body_yaw_rate: f32,
7279    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
7280    pub thrust: f32,
7281    #[doc = "System ID"]
7282    pub target_system: u8,
7283    #[doc = "Component ID"]
7284    pub target_component: u8,
7285    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
7286    pub type_mask: AttitudeTargetTypemask,
7287    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
7288    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7289    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7290    pub thrust_body: [f32; 3],
7291}
7292impl SET_ATTITUDE_TARGET_DATA {
7293    pub const ENCODED_LEN: usize = 51usize;
7294    pub const DEFAULT: Self = Self {
7295        time_boot_ms: 0_u32,
7296        q: [0.0_f32; 4usize],
7297        body_roll_rate: 0.0_f32,
7298        body_pitch_rate: 0.0_f32,
7299        body_yaw_rate: 0.0_f32,
7300        thrust: 0.0_f32,
7301        target_system: 0_u8,
7302        target_component: 0_u8,
7303        type_mask: AttitudeTargetTypemask::DEFAULT,
7304        thrust_body: [0.0_f32; 3usize],
7305    };
7306    #[cfg(feature = "arbitrary")]
7307    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7308        use arbitrary::{Arbitrary, Unstructured};
7309        let mut buf = [0u8; 1024];
7310        rng.fill_bytes(&mut buf);
7311        let mut unstructured = Unstructured::new(&buf);
7312        Self::arbitrary(&mut unstructured).unwrap_or_default()
7313    }
7314}
7315impl Default for SET_ATTITUDE_TARGET_DATA {
7316    fn default() -> Self {
7317        Self::DEFAULT.clone()
7318    }
7319}
7320impl MessageData for SET_ATTITUDE_TARGET_DATA {
7321    type Message = MavMessage;
7322    const ID: u32 = 82u32;
7323    const NAME: &'static str = "SET_ATTITUDE_TARGET";
7324    const EXTRA_CRC: u8 = 49u8;
7325    const ENCODED_LEN: usize = 51usize;
7326    fn deser(
7327        _version: MavlinkVersion,
7328        __input: &[u8],
7329    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7330        let avail_len = __input.len();
7331        let mut payload_buf = [0; Self::ENCODED_LEN];
7332        let mut buf = if avail_len < Self::ENCODED_LEN {
7333            payload_buf[0..avail_len].copy_from_slice(__input);
7334            Bytes::new(&payload_buf)
7335        } else {
7336            Bytes::new(__input)
7337        };
7338        let mut __struct = Self::default();
7339        __struct.time_boot_ms = buf.get_u32_le();
7340        for v in &mut __struct.q {
7341            let val = buf.get_f32_le();
7342            *v = val;
7343        }
7344        __struct.body_roll_rate = buf.get_f32_le();
7345        __struct.body_pitch_rate = buf.get_f32_le();
7346        __struct.body_yaw_rate = buf.get_f32_le();
7347        __struct.thrust = buf.get_f32_le();
7348        __struct.target_system = buf.get_u8();
7349        __struct.target_component = buf.get_u8();
7350        let tmp = buf.get_u8();
7351        __struct.type_mask = AttitudeTargetTypemask::from_bits(
7352            tmp & AttitudeTargetTypemask::all().bits(),
7353        )
7354        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7355            flag_type: "AttitudeTargetTypemask",
7356            value: tmp as u32,
7357        })?;
7358        for v in &mut __struct.thrust_body {
7359            let val = buf.get_f32_le();
7360            *v = val;
7361        }
7362        Ok(__struct)
7363    }
7364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7365        let mut __tmp = BytesMut::new(bytes);
7366        #[allow(clippy::absurd_extreme_comparisons)]
7367        #[allow(unused_comparisons)]
7368        if __tmp.remaining() < Self::ENCODED_LEN {
7369            panic!(
7370                "buffer is too small (need {} bytes, but got {})",
7371                Self::ENCODED_LEN,
7372                __tmp.remaining(),
7373            )
7374        }
7375        __tmp.put_u32_le(self.time_boot_ms);
7376        for val in &self.q {
7377            __tmp.put_f32_le(*val);
7378        }
7379        __tmp.put_f32_le(self.body_roll_rate);
7380        __tmp.put_f32_le(self.body_pitch_rate);
7381        __tmp.put_f32_le(self.body_yaw_rate);
7382        __tmp.put_f32_le(self.thrust);
7383        __tmp.put_u8(self.target_system);
7384        __tmp.put_u8(self.target_component);
7385        __tmp.put_u8(self.type_mask.bits());
7386        for val in &self.thrust_body {
7387            __tmp.put_f32_le(*val);
7388        }
7389        if matches!(version, MavlinkVersion::V2) {
7390            let len = __tmp.len();
7391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7392        } else {
7393            __tmp.len()
7394        }
7395    }
7396}
7397#[doc = "id: 390"]
7398#[doc = "Hardware status sent by an onboard computer."]
7399#[derive(Debug, Clone, PartialEq)]
7400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7402pub struct ONBOARD_COMPUTER_STATUS_DATA {
7403    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7404    pub time_usec: u64,
7405    #[doc = "Time since system boot."]
7406    pub uptime: u32,
7407    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
7408    pub ram_usage: u32,
7409    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
7410    pub ram_total: u32,
7411    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
7412    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7413    pub storage_type: [u32; 4],
7414    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
7415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7416    pub storage_usage: [u32; 4],
7417    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
7418    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7419    pub storage_total: [u32; 4],
7420    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
7421    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7422    pub link_type: [u32; 6],
7423    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
7424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7425    pub link_tx_rate: [u32; 6],
7426    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
7427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7428    pub link_rx_rate: [u32; 6],
7429    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
7430    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7431    pub link_tx_max: [u32; 6],
7432    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
7433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7434    pub link_rx_max: [u32; 6],
7435    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
7436    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7437    pub fan_speed: [i16; 4],
7438    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
7439    pub mavtype: u8,
7440    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
7441    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7442    pub cpu_cores: [u8; 8],
7443    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
7444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7445    pub cpu_combined: [u8; 10],
7446    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
7447    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7448    pub gpu_cores: [u8; 4],
7449    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
7450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7451    pub gpu_combined: [u8; 10],
7452    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
7453    pub temperature_board: i8,
7454    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
7455    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7456    pub temperature_core: [i8; 8],
7457}
7458impl ONBOARD_COMPUTER_STATUS_DATA {
7459    pub const ENCODED_LEN: usize = 238usize;
7460    pub const DEFAULT: Self = Self {
7461        time_usec: 0_u64,
7462        uptime: 0_u32,
7463        ram_usage: 0_u32,
7464        ram_total: 0_u32,
7465        storage_type: [0_u32; 4usize],
7466        storage_usage: [0_u32; 4usize],
7467        storage_total: [0_u32; 4usize],
7468        link_type: [0_u32; 6usize],
7469        link_tx_rate: [0_u32; 6usize],
7470        link_rx_rate: [0_u32; 6usize],
7471        link_tx_max: [0_u32; 6usize],
7472        link_rx_max: [0_u32; 6usize],
7473        fan_speed: [0_i16; 4usize],
7474        mavtype: 0_u8,
7475        cpu_cores: [0_u8; 8usize],
7476        cpu_combined: [0_u8; 10usize],
7477        gpu_cores: [0_u8; 4usize],
7478        gpu_combined: [0_u8; 10usize],
7479        temperature_board: 0_i8,
7480        temperature_core: [0_i8; 8usize],
7481    };
7482    #[cfg(feature = "arbitrary")]
7483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7484        use arbitrary::{Arbitrary, Unstructured};
7485        let mut buf = [0u8; 1024];
7486        rng.fill_bytes(&mut buf);
7487        let mut unstructured = Unstructured::new(&buf);
7488        Self::arbitrary(&mut unstructured).unwrap_or_default()
7489    }
7490}
7491impl Default for ONBOARD_COMPUTER_STATUS_DATA {
7492    fn default() -> Self {
7493        Self::DEFAULT.clone()
7494    }
7495}
7496impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
7497    type Message = MavMessage;
7498    const ID: u32 = 390u32;
7499    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
7500    const EXTRA_CRC: u8 = 156u8;
7501    const ENCODED_LEN: usize = 238usize;
7502    fn deser(
7503        _version: MavlinkVersion,
7504        __input: &[u8],
7505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7506        let avail_len = __input.len();
7507        let mut payload_buf = [0; Self::ENCODED_LEN];
7508        let mut buf = if avail_len < Self::ENCODED_LEN {
7509            payload_buf[0..avail_len].copy_from_slice(__input);
7510            Bytes::new(&payload_buf)
7511        } else {
7512            Bytes::new(__input)
7513        };
7514        let mut __struct = Self::default();
7515        __struct.time_usec = buf.get_u64_le();
7516        __struct.uptime = buf.get_u32_le();
7517        __struct.ram_usage = buf.get_u32_le();
7518        __struct.ram_total = buf.get_u32_le();
7519        for v in &mut __struct.storage_type {
7520            let val = buf.get_u32_le();
7521            *v = val;
7522        }
7523        for v in &mut __struct.storage_usage {
7524            let val = buf.get_u32_le();
7525            *v = val;
7526        }
7527        for v in &mut __struct.storage_total {
7528            let val = buf.get_u32_le();
7529            *v = val;
7530        }
7531        for v in &mut __struct.link_type {
7532            let val = buf.get_u32_le();
7533            *v = val;
7534        }
7535        for v in &mut __struct.link_tx_rate {
7536            let val = buf.get_u32_le();
7537            *v = val;
7538        }
7539        for v in &mut __struct.link_rx_rate {
7540            let val = buf.get_u32_le();
7541            *v = val;
7542        }
7543        for v in &mut __struct.link_tx_max {
7544            let val = buf.get_u32_le();
7545            *v = val;
7546        }
7547        for v in &mut __struct.link_rx_max {
7548            let val = buf.get_u32_le();
7549            *v = val;
7550        }
7551        for v in &mut __struct.fan_speed {
7552            let val = buf.get_i16_le();
7553            *v = val;
7554        }
7555        __struct.mavtype = buf.get_u8();
7556        for v in &mut __struct.cpu_cores {
7557            let val = buf.get_u8();
7558            *v = val;
7559        }
7560        for v in &mut __struct.cpu_combined {
7561            let val = buf.get_u8();
7562            *v = val;
7563        }
7564        for v in &mut __struct.gpu_cores {
7565            let val = buf.get_u8();
7566            *v = val;
7567        }
7568        for v in &mut __struct.gpu_combined {
7569            let val = buf.get_u8();
7570            *v = val;
7571        }
7572        __struct.temperature_board = buf.get_i8();
7573        for v in &mut __struct.temperature_core {
7574            let val = buf.get_i8();
7575            *v = val;
7576        }
7577        Ok(__struct)
7578    }
7579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7580        let mut __tmp = BytesMut::new(bytes);
7581        #[allow(clippy::absurd_extreme_comparisons)]
7582        #[allow(unused_comparisons)]
7583        if __tmp.remaining() < Self::ENCODED_LEN {
7584            panic!(
7585                "buffer is too small (need {} bytes, but got {})",
7586                Self::ENCODED_LEN,
7587                __tmp.remaining(),
7588            )
7589        }
7590        __tmp.put_u64_le(self.time_usec);
7591        __tmp.put_u32_le(self.uptime);
7592        __tmp.put_u32_le(self.ram_usage);
7593        __tmp.put_u32_le(self.ram_total);
7594        for val in &self.storage_type {
7595            __tmp.put_u32_le(*val);
7596        }
7597        for val in &self.storage_usage {
7598            __tmp.put_u32_le(*val);
7599        }
7600        for val in &self.storage_total {
7601            __tmp.put_u32_le(*val);
7602        }
7603        for val in &self.link_type {
7604            __tmp.put_u32_le(*val);
7605        }
7606        for val in &self.link_tx_rate {
7607            __tmp.put_u32_le(*val);
7608        }
7609        for val in &self.link_rx_rate {
7610            __tmp.put_u32_le(*val);
7611        }
7612        for val in &self.link_tx_max {
7613            __tmp.put_u32_le(*val);
7614        }
7615        for val in &self.link_rx_max {
7616            __tmp.put_u32_le(*val);
7617        }
7618        for val in &self.fan_speed {
7619            __tmp.put_i16_le(*val);
7620        }
7621        __tmp.put_u8(self.mavtype);
7622        for val in &self.cpu_cores {
7623            __tmp.put_u8(*val);
7624        }
7625        for val in &self.cpu_combined {
7626            __tmp.put_u8(*val);
7627        }
7628        for val in &self.gpu_cores {
7629            __tmp.put_u8(*val);
7630        }
7631        for val in &self.gpu_combined {
7632            __tmp.put_u8(*val);
7633        }
7634        __tmp.put_i8(self.temperature_board);
7635        for val in &self.temperature_core {
7636            __tmp.put_i8(*val);
7637        }
7638        if matches!(version, MavlinkVersion::V2) {
7639            let len = __tmp.len();
7640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7641        } else {
7642            __tmp.len()
7643        }
7644    }
7645}
7646#[doc = "id: 321"]
7647#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
7648#[derive(Debug, Clone, PartialEq)]
7649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7651pub struct PARAM_EXT_REQUEST_LIST_DATA {
7652    #[doc = "System ID"]
7653    pub target_system: u8,
7654    #[doc = "Component ID"]
7655    pub target_component: u8,
7656}
7657impl PARAM_EXT_REQUEST_LIST_DATA {
7658    pub const ENCODED_LEN: usize = 2usize;
7659    pub const DEFAULT: Self = Self {
7660        target_system: 0_u8,
7661        target_component: 0_u8,
7662    };
7663    #[cfg(feature = "arbitrary")]
7664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7665        use arbitrary::{Arbitrary, Unstructured};
7666        let mut buf = [0u8; 1024];
7667        rng.fill_bytes(&mut buf);
7668        let mut unstructured = Unstructured::new(&buf);
7669        Self::arbitrary(&mut unstructured).unwrap_or_default()
7670    }
7671}
7672impl Default for PARAM_EXT_REQUEST_LIST_DATA {
7673    fn default() -> Self {
7674        Self::DEFAULT.clone()
7675    }
7676}
7677impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
7678    type Message = MavMessage;
7679    const ID: u32 = 321u32;
7680    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
7681    const EXTRA_CRC: u8 = 88u8;
7682    const ENCODED_LEN: usize = 2usize;
7683    fn deser(
7684        _version: MavlinkVersion,
7685        __input: &[u8],
7686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7687        let avail_len = __input.len();
7688        let mut payload_buf = [0; Self::ENCODED_LEN];
7689        let mut buf = if avail_len < Self::ENCODED_LEN {
7690            payload_buf[0..avail_len].copy_from_slice(__input);
7691            Bytes::new(&payload_buf)
7692        } else {
7693            Bytes::new(__input)
7694        };
7695        let mut __struct = Self::default();
7696        __struct.target_system = buf.get_u8();
7697        __struct.target_component = buf.get_u8();
7698        Ok(__struct)
7699    }
7700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7701        let mut __tmp = BytesMut::new(bytes);
7702        #[allow(clippy::absurd_extreme_comparisons)]
7703        #[allow(unused_comparisons)]
7704        if __tmp.remaining() < Self::ENCODED_LEN {
7705            panic!(
7706                "buffer is too small (need {} bytes, but got {})",
7707                Self::ENCODED_LEN,
7708                __tmp.remaining(),
7709            )
7710        }
7711        __tmp.put_u8(self.target_system);
7712        __tmp.put_u8(self.target_component);
7713        if matches!(version, MavlinkVersion::V2) {
7714            let len = __tmp.len();
7715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7716        } else {
7717            __tmp.len()
7718        }
7719    }
7720}
7721#[doc = "id: 9005"]
7722#[doc = "Winch status."]
7723#[derive(Debug, Clone, PartialEq)]
7724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7726pub struct WINCH_STATUS_DATA {
7727    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
7728    pub time_usec: u64,
7729    #[doc = "Length of line released. NaN if unknown"]
7730    pub line_length: f32,
7731    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
7732    pub speed: f32,
7733    #[doc = "Tension on the line. NaN if unknown"]
7734    pub tension: f32,
7735    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
7736    pub voltage: f32,
7737    #[doc = "Current draw from the winch. NaN if unknown"]
7738    pub current: f32,
7739    #[doc = "Status flags"]
7740    pub status: MavWinchStatusFlag,
7741    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
7742    pub temperature: i16,
7743}
7744impl WINCH_STATUS_DATA {
7745    pub const ENCODED_LEN: usize = 34usize;
7746    pub const DEFAULT: Self = Self {
7747        time_usec: 0_u64,
7748        line_length: 0.0_f32,
7749        speed: 0.0_f32,
7750        tension: 0.0_f32,
7751        voltage: 0.0_f32,
7752        current: 0.0_f32,
7753        status: MavWinchStatusFlag::DEFAULT,
7754        temperature: 0_i16,
7755    };
7756    #[cfg(feature = "arbitrary")]
7757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7758        use arbitrary::{Arbitrary, Unstructured};
7759        let mut buf = [0u8; 1024];
7760        rng.fill_bytes(&mut buf);
7761        let mut unstructured = Unstructured::new(&buf);
7762        Self::arbitrary(&mut unstructured).unwrap_or_default()
7763    }
7764}
7765impl Default for WINCH_STATUS_DATA {
7766    fn default() -> Self {
7767        Self::DEFAULT.clone()
7768    }
7769}
7770impl MessageData for WINCH_STATUS_DATA {
7771    type Message = MavMessage;
7772    const ID: u32 = 9005u32;
7773    const NAME: &'static str = "WINCH_STATUS";
7774    const EXTRA_CRC: u8 = 117u8;
7775    const ENCODED_LEN: usize = 34usize;
7776    fn deser(
7777        _version: MavlinkVersion,
7778        __input: &[u8],
7779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7780        let avail_len = __input.len();
7781        let mut payload_buf = [0; Self::ENCODED_LEN];
7782        let mut buf = if avail_len < Self::ENCODED_LEN {
7783            payload_buf[0..avail_len].copy_from_slice(__input);
7784            Bytes::new(&payload_buf)
7785        } else {
7786            Bytes::new(__input)
7787        };
7788        let mut __struct = Self::default();
7789        __struct.time_usec = buf.get_u64_le();
7790        __struct.line_length = buf.get_f32_le();
7791        __struct.speed = buf.get_f32_le();
7792        __struct.tension = buf.get_f32_le();
7793        __struct.voltage = buf.get_f32_le();
7794        __struct.current = buf.get_f32_le();
7795        let tmp = buf.get_u32_le();
7796        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
7797            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7798                flag_type: "MavWinchStatusFlag",
7799                value: tmp as u32,
7800            })?;
7801        __struct.temperature = buf.get_i16_le();
7802        Ok(__struct)
7803    }
7804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7805        let mut __tmp = BytesMut::new(bytes);
7806        #[allow(clippy::absurd_extreme_comparisons)]
7807        #[allow(unused_comparisons)]
7808        if __tmp.remaining() < Self::ENCODED_LEN {
7809            panic!(
7810                "buffer is too small (need {} bytes, but got {})",
7811                Self::ENCODED_LEN,
7812                __tmp.remaining(),
7813            )
7814        }
7815        __tmp.put_u64_le(self.time_usec);
7816        __tmp.put_f32_le(self.line_length);
7817        __tmp.put_f32_le(self.speed);
7818        __tmp.put_f32_le(self.tension);
7819        __tmp.put_f32_le(self.voltage);
7820        __tmp.put_f32_le(self.current);
7821        __tmp.put_u32_le(self.status.bits());
7822        __tmp.put_i16_le(self.temperature);
7823        if matches!(version, MavlinkVersion::V2) {
7824            let len = __tmp.len();
7825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7826        } else {
7827            __tmp.len()
7828        }
7829    }
7830}
7831#[doc = "id: 34"]
7832#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
7833#[derive(Debug, Clone, PartialEq)]
7834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7836pub struct RC_CHANNELS_SCALED_DATA {
7837    #[doc = "Timestamp (time since system boot)."]
7838    pub time_boot_ms: u32,
7839    #[doc = "RC channel 1 value scaled."]
7840    pub chan1_scaled: i16,
7841    #[doc = "RC channel 2 value scaled."]
7842    pub chan2_scaled: i16,
7843    #[doc = "RC channel 3 value scaled."]
7844    pub chan3_scaled: i16,
7845    #[doc = "RC channel 4 value scaled."]
7846    pub chan4_scaled: i16,
7847    #[doc = "RC channel 5 value scaled."]
7848    pub chan5_scaled: i16,
7849    #[doc = "RC channel 6 value scaled."]
7850    pub chan6_scaled: i16,
7851    #[doc = "RC channel 7 value scaled."]
7852    pub chan7_scaled: i16,
7853    #[doc = "RC channel 8 value scaled."]
7854    pub chan8_scaled: i16,
7855    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
7856    pub port: u8,
7857    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
7858    pub rssi: u8,
7859}
7860impl RC_CHANNELS_SCALED_DATA {
7861    pub const ENCODED_LEN: usize = 22usize;
7862    pub const DEFAULT: Self = Self {
7863        time_boot_ms: 0_u32,
7864        chan1_scaled: 0_i16,
7865        chan2_scaled: 0_i16,
7866        chan3_scaled: 0_i16,
7867        chan4_scaled: 0_i16,
7868        chan5_scaled: 0_i16,
7869        chan6_scaled: 0_i16,
7870        chan7_scaled: 0_i16,
7871        chan8_scaled: 0_i16,
7872        port: 0_u8,
7873        rssi: 0_u8,
7874    };
7875    #[cfg(feature = "arbitrary")]
7876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7877        use arbitrary::{Arbitrary, Unstructured};
7878        let mut buf = [0u8; 1024];
7879        rng.fill_bytes(&mut buf);
7880        let mut unstructured = Unstructured::new(&buf);
7881        Self::arbitrary(&mut unstructured).unwrap_or_default()
7882    }
7883}
7884impl Default for RC_CHANNELS_SCALED_DATA {
7885    fn default() -> Self {
7886        Self::DEFAULT.clone()
7887    }
7888}
7889impl MessageData for RC_CHANNELS_SCALED_DATA {
7890    type Message = MavMessage;
7891    const ID: u32 = 34u32;
7892    const NAME: &'static str = "RC_CHANNELS_SCALED";
7893    const EXTRA_CRC: u8 = 237u8;
7894    const ENCODED_LEN: usize = 22usize;
7895    fn deser(
7896        _version: MavlinkVersion,
7897        __input: &[u8],
7898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7899        let avail_len = __input.len();
7900        let mut payload_buf = [0; Self::ENCODED_LEN];
7901        let mut buf = if avail_len < Self::ENCODED_LEN {
7902            payload_buf[0..avail_len].copy_from_slice(__input);
7903            Bytes::new(&payload_buf)
7904        } else {
7905            Bytes::new(__input)
7906        };
7907        let mut __struct = Self::default();
7908        __struct.time_boot_ms = buf.get_u32_le();
7909        __struct.chan1_scaled = buf.get_i16_le();
7910        __struct.chan2_scaled = buf.get_i16_le();
7911        __struct.chan3_scaled = buf.get_i16_le();
7912        __struct.chan4_scaled = buf.get_i16_le();
7913        __struct.chan5_scaled = buf.get_i16_le();
7914        __struct.chan6_scaled = buf.get_i16_le();
7915        __struct.chan7_scaled = buf.get_i16_le();
7916        __struct.chan8_scaled = buf.get_i16_le();
7917        __struct.port = buf.get_u8();
7918        __struct.rssi = buf.get_u8();
7919        Ok(__struct)
7920    }
7921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7922        let mut __tmp = BytesMut::new(bytes);
7923        #[allow(clippy::absurd_extreme_comparisons)]
7924        #[allow(unused_comparisons)]
7925        if __tmp.remaining() < Self::ENCODED_LEN {
7926            panic!(
7927                "buffer is too small (need {} bytes, but got {})",
7928                Self::ENCODED_LEN,
7929                __tmp.remaining(),
7930            )
7931        }
7932        __tmp.put_u32_le(self.time_boot_ms);
7933        __tmp.put_i16_le(self.chan1_scaled);
7934        __tmp.put_i16_le(self.chan2_scaled);
7935        __tmp.put_i16_le(self.chan3_scaled);
7936        __tmp.put_i16_le(self.chan4_scaled);
7937        __tmp.put_i16_le(self.chan5_scaled);
7938        __tmp.put_i16_le(self.chan6_scaled);
7939        __tmp.put_i16_le(self.chan7_scaled);
7940        __tmp.put_i16_le(self.chan8_scaled);
7941        __tmp.put_u8(self.port);
7942        __tmp.put_u8(self.rssi);
7943        if matches!(version, MavlinkVersion::V2) {
7944            let len = __tmp.len();
7945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7946        } else {
7947            __tmp.len()
7948        }
7949    }
7950}
7951#[doc = "id: 61"]
7952#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
7953#[derive(Debug, Clone, PartialEq)]
7954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7956pub struct ATTITUDE_QUATERNION_COV_DATA {
7957    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7958    pub time_usec: u64,
7959    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
7960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7961    pub q: [f32; 4],
7962    #[doc = "Roll angular speed"]
7963    pub rollspeed: f32,
7964    #[doc = "Pitch angular speed"]
7965    pub pitchspeed: f32,
7966    #[doc = "Yaw angular speed"]
7967    pub yawspeed: f32,
7968    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
7969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7970    pub covariance: [f32; 9],
7971}
7972impl ATTITUDE_QUATERNION_COV_DATA {
7973    pub const ENCODED_LEN: usize = 72usize;
7974    pub const DEFAULT: Self = Self {
7975        time_usec: 0_u64,
7976        q: [0.0_f32; 4usize],
7977        rollspeed: 0.0_f32,
7978        pitchspeed: 0.0_f32,
7979        yawspeed: 0.0_f32,
7980        covariance: [0.0_f32; 9usize],
7981    };
7982    #[cfg(feature = "arbitrary")]
7983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7984        use arbitrary::{Arbitrary, Unstructured};
7985        let mut buf = [0u8; 1024];
7986        rng.fill_bytes(&mut buf);
7987        let mut unstructured = Unstructured::new(&buf);
7988        Self::arbitrary(&mut unstructured).unwrap_or_default()
7989    }
7990}
7991impl Default for ATTITUDE_QUATERNION_COV_DATA {
7992    fn default() -> Self {
7993        Self::DEFAULT.clone()
7994    }
7995}
7996impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
7997    type Message = MavMessage;
7998    const ID: u32 = 61u32;
7999    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
8000    const EXTRA_CRC: u8 = 167u8;
8001    const ENCODED_LEN: usize = 72usize;
8002    fn deser(
8003        _version: MavlinkVersion,
8004        __input: &[u8],
8005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8006        let avail_len = __input.len();
8007        let mut payload_buf = [0; Self::ENCODED_LEN];
8008        let mut buf = if avail_len < Self::ENCODED_LEN {
8009            payload_buf[0..avail_len].copy_from_slice(__input);
8010            Bytes::new(&payload_buf)
8011        } else {
8012            Bytes::new(__input)
8013        };
8014        let mut __struct = Self::default();
8015        __struct.time_usec = buf.get_u64_le();
8016        for v in &mut __struct.q {
8017            let val = buf.get_f32_le();
8018            *v = val;
8019        }
8020        __struct.rollspeed = buf.get_f32_le();
8021        __struct.pitchspeed = buf.get_f32_le();
8022        __struct.yawspeed = buf.get_f32_le();
8023        for v in &mut __struct.covariance {
8024            let val = buf.get_f32_le();
8025            *v = val;
8026        }
8027        Ok(__struct)
8028    }
8029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8030        let mut __tmp = BytesMut::new(bytes);
8031        #[allow(clippy::absurd_extreme_comparisons)]
8032        #[allow(unused_comparisons)]
8033        if __tmp.remaining() < Self::ENCODED_LEN {
8034            panic!(
8035                "buffer is too small (need {} bytes, but got {})",
8036                Self::ENCODED_LEN,
8037                __tmp.remaining(),
8038            )
8039        }
8040        __tmp.put_u64_le(self.time_usec);
8041        for val in &self.q {
8042            __tmp.put_f32_le(*val);
8043        }
8044        __tmp.put_f32_le(self.rollspeed);
8045        __tmp.put_f32_le(self.pitchspeed);
8046        __tmp.put_f32_le(self.yawspeed);
8047        for val in &self.covariance {
8048            __tmp.put_f32_le(*val);
8049        }
8050        if matches!(version, MavlinkVersion::V2) {
8051            let len = __tmp.len();
8052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8053        } else {
8054            __tmp.len()
8055        }
8056    }
8057}
8058#[doc = "id: 12903"]
8059#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
8060#[derive(Debug, Clone, PartialEq)]
8061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8063pub struct OPEN_DRONE_ID_SELF_ID_DATA {
8064    #[doc = "System ID (0 for broadcast)."]
8065    pub target_system: u8,
8066    #[doc = "Component ID (0 for broadcast)."]
8067    pub target_component: u8,
8068    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
8069    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8070    pub id_or_mac: [u8; 20],
8071    #[doc = "Indicates the type of the description field."]
8072    pub description_type: MavOdidDescType,
8073    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
8074    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8075    pub description: [u8; 23],
8076}
8077impl OPEN_DRONE_ID_SELF_ID_DATA {
8078    pub const ENCODED_LEN: usize = 46usize;
8079    pub const DEFAULT: Self = Self {
8080        target_system: 0_u8,
8081        target_component: 0_u8,
8082        id_or_mac: [0_u8; 20usize],
8083        description_type: MavOdidDescType::DEFAULT,
8084        description: [0_u8; 23usize],
8085    };
8086    #[cfg(feature = "arbitrary")]
8087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8088        use arbitrary::{Arbitrary, Unstructured};
8089        let mut buf = [0u8; 1024];
8090        rng.fill_bytes(&mut buf);
8091        let mut unstructured = Unstructured::new(&buf);
8092        Self::arbitrary(&mut unstructured).unwrap_or_default()
8093    }
8094}
8095impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
8096    fn default() -> Self {
8097        Self::DEFAULT.clone()
8098    }
8099}
8100impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
8101    type Message = MavMessage;
8102    const ID: u32 = 12903u32;
8103    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
8104    const EXTRA_CRC: u8 = 249u8;
8105    const ENCODED_LEN: usize = 46usize;
8106    fn deser(
8107        _version: MavlinkVersion,
8108        __input: &[u8],
8109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8110        let avail_len = __input.len();
8111        let mut payload_buf = [0; Self::ENCODED_LEN];
8112        let mut buf = if avail_len < Self::ENCODED_LEN {
8113            payload_buf[0..avail_len].copy_from_slice(__input);
8114            Bytes::new(&payload_buf)
8115        } else {
8116            Bytes::new(__input)
8117        };
8118        let mut __struct = Self::default();
8119        __struct.target_system = buf.get_u8();
8120        __struct.target_component = buf.get_u8();
8121        for v in &mut __struct.id_or_mac {
8122            let val = buf.get_u8();
8123            *v = val;
8124        }
8125        let tmp = buf.get_u8();
8126        __struct.description_type =
8127            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8128                enum_type: "MavOdidDescType",
8129                value: tmp as u32,
8130            })?;
8131        for v in &mut __struct.description {
8132            let val = buf.get_u8();
8133            *v = val;
8134        }
8135        Ok(__struct)
8136    }
8137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8138        let mut __tmp = BytesMut::new(bytes);
8139        #[allow(clippy::absurd_extreme_comparisons)]
8140        #[allow(unused_comparisons)]
8141        if __tmp.remaining() < Self::ENCODED_LEN {
8142            panic!(
8143                "buffer is too small (need {} bytes, but got {})",
8144                Self::ENCODED_LEN,
8145                __tmp.remaining(),
8146            )
8147        }
8148        __tmp.put_u8(self.target_system);
8149        __tmp.put_u8(self.target_component);
8150        for val in &self.id_or_mac {
8151            __tmp.put_u8(*val);
8152        }
8153        __tmp.put_u8(self.description_type as u8);
8154        for val in &self.description {
8155            __tmp.put_u8(*val);
8156        }
8157        if matches!(version, MavlinkVersion::V2) {
8158            let len = __tmp.len();
8159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8160        } else {
8161            __tmp.len()
8162        }
8163    }
8164}
8165#[doc = "id: 395"]
8166#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
8167#[derive(Debug, Clone, PartialEq)]
8168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8170pub struct COMPONENT_INFORMATION_DATA {
8171    #[doc = "Timestamp (time since system boot)."]
8172    pub time_boot_ms: u32,
8173    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
8174    pub general_metadata_file_crc: u32,
8175    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
8176    pub peripherals_metadata_file_crc: u32,
8177    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
8178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8179    pub general_metadata_uri: [u8; 100],
8180    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
8181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8182    pub peripherals_metadata_uri: [u8; 100],
8183}
8184impl COMPONENT_INFORMATION_DATA {
8185    pub const ENCODED_LEN: usize = 212usize;
8186    pub const DEFAULT: Self = Self {
8187        time_boot_ms: 0_u32,
8188        general_metadata_file_crc: 0_u32,
8189        peripherals_metadata_file_crc: 0_u32,
8190        general_metadata_uri: [0_u8; 100usize],
8191        peripherals_metadata_uri: [0_u8; 100usize],
8192    };
8193    #[cfg(feature = "arbitrary")]
8194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8195        use arbitrary::{Arbitrary, Unstructured};
8196        let mut buf = [0u8; 1024];
8197        rng.fill_bytes(&mut buf);
8198        let mut unstructured = Unstructured::new(&buf);
8199        Self::arbitrary(&mut unstructured).unwrap_or_default()
8200    }
8201}
8202impl Default for COMPONENT_INFORMATION_DATA {
8203    fn default() -> Self {
8204        Self::DEFAULT.clone()
8205    }
8206}
8207impl MessageData for COMPONENT_INFORMATION_DATA {
8208    type Message = MavMessage;
8209    const ID: u32 = 395u32;
8210    const NAME: &'static str = "COMPONENT_INFORMATION";
8211    const EXTRA_CRC: u8 = 0u8;
8212    const ENCODED_LEN: usize = 212usize;
8213    fn deser(
8214        _version: MavlinkVersion,
8215        __input: &[u8],
8216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8217        let avail_len = __input.len();
8218        let mut payload_buf = [0; Self::ENCODED_LEN];
8219        let mut buf = if avail_len < Self::ENCODED_LEN {
8220            payload_buf[0..avail_len].copy_from_slice(__input);
8221            Bytes::new(&payload_buf)
8222        } else {
8223            Bytes::new(__input)
8224        };
8225        let mut __struct = Self::default();
8226        __struct.time_boot_ms = buf.get_u32_le();
8227        __struct.general_metadata_file_crc = buf.get_u32_le();
8228        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
8229        for v in &mut __struct.general_metadata_uri {
8230            let val = buf.get_u8();
8231            *v = val;
8232        }
8233        for v in &mut __struct.peripherals_metadata_uri {
8234            let val = buf.get_u8();
8235            *v = val;
8236        }
8237        Ok(__struct)
8238    }
8239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8240        let mut __tmp = BytesMut::new(bytes);
8241        #[allow(clippy::absurd_extreme_comparisons)]
8242        #[allow(unused_comparisons)]
8243        if __tmp.remaining() < Self::ENCODED_LEN {
8244            panic!(
8245                "buffer is too small (need {} bytes, but got {})",
8246                Self::ENCODED_LEN,
8247                __tmp.remaining(),
8248            )
8249        }
8250        __tmp.put_u32_le(self.time_boot_ms);
8251        __tmp.put_u32_le(self.general_metadata_file_crc);
8252        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
8253        for val in &self.general_metadata_uri {
8254            __tmp.put_u8(*val);
8255        }
8256        for val in &self.peripherals_metadata_uri {
8257            __tmp.put_u8(*val);
8258        }
8259        if matches!(version, MavlinkVersion::V2) {
8260            let len = __tmp.len();
8261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8262        } else {
8263            __tmp.len()
8264        }
8265    }
8266}
8267#[doc = "id: 301"]
8268#[doc = "The location and information of an AIS vessel."]
8269#[derive(Debug, Clone, PartialEq)]
8270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8272pub struct AIS_VESSEL_DATA {
8273    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
8274    pub MMSI: u32,
8275    #[doc = "Latitude"]
8276    pub lat: i32,
8277    #[doc = "Longitude"]
8278    pub lon: i32,
8279    #[doc = "Course over ground"]
8280    pub COG: u16,
8281    #[doc = "True heading"]
8282    pub heading: u16,
8283    #[doc = "Speed over ground"]
8284    pub velocity: u16,
8285    #[doc = "Distance from lat/lon location to bow"]
8286    pub dimension_bow: u16,
8287    #[doc = "Distance from lat/lon location to stern"]
8288    pub dimension_stern: u16,
8289    #[doc = "Time since last communication in seconds"]
8290    pub tslc: u16,
8291    #[doc = "Bitmask to indicate various statuses including valid data fields"]
8292    pub flags: AisFlags,
8293    #[doc = "Turn rate"]
8294    pub turn_rate: i8,
8295    #[doc = "Navigational status"]
8296    pub navigational_status: AisNavStatus,
8297    #[doc = "Type of vessels"]
8298    pub mavtype: AisType,
8299    #[doc = "Distance from lat/lon location to port side"]
8300    pub dimension_port: u8,
8301    #[doc = "Distance from lat/lon location to starboard side"]
8302    pub dimension_starboard: u8,
8303    #[doc = "The vessel callsign"]
8304    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8305    pub callsign: [u8; 7],
8306    #[doc = "The vessel name"]
8307    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8308    pub name: [u8; 20],
8309}
8310impl AIS_VESSEL_DATA {
8311    pub const ENCODED_LEN: usize = 58usize;
8312    pub const DEFAULT: Self = Self {
8313        MMSI: 0_u32,
8314        lat: 0_i32,
8315        lon: 0_i32,
8316        COG: 0_u16,
8317        heading: 0_u16,
8318        velocity: 0_u16,
8319        dimension_bow: 0_u16,
8320        dimension_stern: 0_u16,
8321        tslc: 0_u16,
8322        flags: AisFlags::DEFAULT,
8323        turn_rate: 0_i8,
8324        navigational_status: AisNavStatus::DEFAULT,
8325        mavtype: AisType::DEFAULT,
8326        dimension_port: 0_u8,
8327        dimension_starboard: 0_u8,
8328        callsign: [0_u8; 7usize],
8329        name: [0_u8; 20usize],
8330    };
8331    #[cfg(feature = "arbitrary")]
8332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8333        use arbitrary::{Arbitrary, Unstructured};
8334        let mut buf = [0u8; 1024];
8335        rng.fill_bytes(&mut buf);
8336        let mut unstructured = Unstructured::new(&buf);
8337        Self::arbitrary(&mut unstructured).unwrap_or_default()
8338    }
8339}
8340impl Default for AIS_VESSEL_DATA {
8341    fn default() -> Self {
8342        Self::DEFAULT.clone()
8343    }
8344}
8345impl MessageData for AIS_VESSEL_DATA {
8346    type Message = MavMessage;
8347    const ID: u32 = 301u32;
8348    const NAME: &'static str = "AIS_VESSEL";
8349    const EXTRA_CRC: u8 = 243u8;
8350    const ENCODED_LEN: usize = 58usize;
8351    fn deser(
8352        _version: MavlinkVersion,
8353        __input: &[u8],
8354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8355        let avail_len = __input.len();
8356        let mut payload_buf = [0; Self::ENCODED_LEN];
8357        let mut buf = if avail_len < Self::ENCODED_LEN {
8358            payload_buf[0..avail_len].copy_from_slice(__input);
8359            Bytes::new(&payload_buf)
8360        } else {
8361            Bytes::new(__input)
8362        };
8363        let mut __struct = Self::default();
8364        __struct.MMSI = buf.get_u32_le();
8365        __struct.lat = buf.get_i32_le();
8366        __struct.lon = buf.get_i32_le();
8367        __struct.COG = buf.get_u16_le();
8368        __struct.heading = buf.get_u16_le();
8369        __struct.velocity = buf.get_u16_le();
8370        __struct.dimension_bow = buf.get_u16_le();
8371        __struct.dimension_stern = buf.get_u16_le();
8372        __struct.tslc = buf.get_u16_le();
8373        let tmp = buf.get_u16_le();
8374        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
8375            ::mavlink_core::error::ParserError::InvalidFlag {
8376                flag_type: "AisFlags",
8377                value: tmp as u32,
8378            },
8379        )?;
8380        __struct.turn_rate = buf.get_i8();
8381        let tmp = buf.get_u8();
8382        __struct.navigational_status =
8383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8384                enum_type: "AisNavStatus",
8385                value: tmp as u32,
8386            })?;
8387        let tmp = buf.get_u8();
8388        __struct.mavtype =
8389            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8390                enum_type: "AisType",
8391                value: tmp as u32,
8392            })?;
8393        __struct.dimension_port = buf.get_u8();
8394        __struct.dimension_starboard = buf.get_u8();
8395        for v in &mut __struct.callsign {
8396            let val = buf.get_u8();
8397            *v = val;
8398        }
8399        for v in &mut __struct.name {
8400            let val = buf.get_u8();
8401            *v = val;
8402        }
8403        Ok(__struct)
8404    }
8405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8406        let mut __tmp = BytesMut::new(bytes);
8407        #[allow(clippy::absurd_extreme_comparisons)]
8408        #[allow(unused_comparisons)]
8409        if __tmp.remaining() < Self::ENCODED_LEN {
8410            panic!(
8411                "buffer is too small (need {} bytes, but got {})",
8412                Self::ENCODED_LEN,
8413                __tmp.remaining(),
8414            )
8415        }
8416        __tmp.put_u32_le(self.MMSI);
8417        __tmp.put_i32_le(self.lat);
8418        __tmp.put_i32_le(self.lon);
8419        __tmp.put_u16_le(self.COG);
8420        __tmp.put_u16_le(self.heading);
8421        __tmp.put_u16_le(self.velocity);
8422        __tmp.put_u16_le(self.dimension_bow);
8423        __tmp.put_u16_le(self.dimension_stern);
8424        __tmp.put_u16_le(self.tslc);
8425        __tmp.put_u16_le(self.flags.bits());
8426        __tmp.put_i8(self.turn_rate);
8427        __tmp.put_u8(self.navigational_status as u8);
8428        __tmp.put_u8(self.mavtype as u8);
8429        __tmp.put_u8(self.dimension_port);
8430        __tmp.put_u8(self.dimension_starboard);
8431        for val in &self.callsign {
8432            __tmp.put_u8(*val);
8433        }
8434        for val in &self.name {
8435            __tmp.put_u8(*val);
8436        }
8437        if matches!(version, MavlinkVersion::V2) {
8438            let len = __tmp.len();
8439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8440        } else {
8441            __tmp.len()
8442        }
8443    }
8444}
8445#[doc = "id: 144"]
8446#[doc = "Current motion information from a designated system."]
8447#[derive(Debug, Clone, PartialEq)]
8448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8450pub struct FOLLOW_TARGET_DATA {
8451    #[doc = "Timestamp (time since system boot)."]
8452    pub timestamp: u64,
8453    #[doc = "button states or switches of a tracker device"]
8454    pub custom_state: u64,
8455    #[doc = "Latitude (WGS84)"]
8456    pub lat: i32,
8457    #[doc = "Longitude (WGS84)"]
8458    pub lon: i32,
8459    #[doc = "Altitude (MSL)"]
8460    pub alt: f32,
8461    #[doc = "target velocity (0,0,0) for unknown"]
8462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8463    pub vel: [f32; 3],
8464    #[doc = "linear target acceleration (0,0,0) for unknown"]
8465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8466    pub acc: [f32; 3],
8467    #[doc = "(0 0 0 0 for unknown)"]
8468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8469    pub attitude_q: [f32; 4],
8470    #[doc = "(0 0 0 for unknown)"]
8471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8472    pub rates: [f32; 3],
8473    #[doc = "eph epv"]
8474    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8475    pub position_cov: [f32; 3],
8476    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
8477    pub est_capabilities: u8,
8478}
8479impl FOLLOW_TARGET_DATA {
8480    pub const ENCODED_LEN: usize = 93usize;
8481    pub const DEFAULT: Self = Self {
8482        timestamp: 0_u64,
8483        custom_state: 0_u64,
8484        lat: 0_i32,
8485        lon: 0_i32,
8486        alt: 0.0_f32,
8487        vel: [0.0_f32; 3usize],
8488        acc: [0.0_f32; 3usize],
8489        attitude_q: [0.0_f32; 4usize],
8490        rates: [0.0_f32; 3usize],
8491        position_cov: [0.0_f32; 3usize],
8492        est_capabilities: 0_u8,
8493    };
8494    #[cfg(feature = "arbitrary")]
8495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8496        use arbitrary::{Arbitrary, Unstructured};
8497        let mut buf = [0u8; 1024];
8498        rng.fill_bytes(&mut buf);
8499        let mut unstructured = Unstructured::new(&buf);
8500        Self::arbitrary(&mut unstructured).unwrap_or_default()
8501    }
8502}
8503impl Default for FOLLOW_TARGET_DATA {
8504    fn default() -> Self {
8505        Self::DEFAULT.clone()
8506    }
8507}
8508impl MessageData for FOLLOW_TARGET_DATA {
8509    type Message = MavMessage;
8510    const ID: u32 = 144u32;
8511    const NAME: &'static str = "FOLLOW_TARGET";
8512    const EXTRA_CRC: u8 = 127u8;
8513    const ENCODED_LEN: usize = 93usize;
8514    fn deser(
8515        _version: MavlinkVersion,
8516        __input: &[u8],
8517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8518        let avail_len = __input.len();
8519        let mut payload_buf = [0; Self::ENCODED_LEN];
8520        let mut buf = if avail_len < Self::ENCODED_LEN {
8521            payload_buf[0..avail_len].copy_from_slice(__input);
8522            Bytes::new(&payload_buf)
8523        } else {
8524            Bytes::new(__input)
8525        };
8526        let mut __struct = Self::default();
8527        __struct.timestamp = buf.get_u64_le();
8528        __struct.custom_state = buf.get_u64_le();
8529        __struct.lat = buf.get_i32_le();
8530        __struct.lon = buf.get_i32_le();
8531        __struct.alt = buf.get_f32_le();
8532        for v in &mut __struct.vel {
8533            let val = buf.get_f32_le();
8534            *v = val;
8535        }
8536        for v in &mut __struct.acc {
8537            let val = buf.get_f32_le();
8538            *v = val;
8539        }
8540        for v in &mut __struct.attitude_q {
8541            let val = buf.get_f32_le();
8542            *v = val;
8543        }
8544        for v in &mut __struct.rates {
8545            let val = buf.get_f32_le();
8546            *v = val;
8547        }
8548        for v in &mut __struct.position_cov {
8549            let val = buf.get_f32_le();
8550            *v = val;
8551        }
8552        __struct.est_capabilities = buf.get_u8();
8553        Ok(__struct)
8554    }
8555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8556        let mut __tmp = BytesMut::new(bytes);
8557        #[allow(clippy::absurd_extreme_comparisons)]
8558        #[allow(unused_comparisons)]
8559        if __tmp.remaining() < Self::ENCODED_LEN {
8560            panic!(
8561                "buffer is too small (need {} bytes, but got {})",
8562                Self::ENCODED_LEN,
8563                __tmp.remaining(),
8564            )
8565        }
8566        __tmp.put_u64_le(self.timestamp);
8567        __tmp.put_u64_le(self.custom_state);
8568        __tmp.put_i32_le(self.lat);
8569        __tmp.put_i32_le(self.lon);
8570        __tmp.put_f32_le(self.alt);
8571        for val in &self.vel {
8572            __tmp.put_f32_le(*val);
8573        }
8574        for val in &self.acc {
8575            __tmp.put_f32_le(*val);
8576        }
8577        for val in &self.attitude_q {
8578            __tmp.put_f32_le(*val);
8579        }
8580        for val in &self.rates {
8581            __tmp.put_f32_le(*val);
8582        }
8583        for val in &self.position_cov {
8584            __tmp.put_f32_le(*val);
8585        }
8586        __tmp.put_u8(self.est_capabilities);
8587        if matches!(version, MavlinkVersion::V2) {
8588            let len = __tmp.len();
8589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8590        } else {
8591            __tmp.len()
8592        }
8593    }
8594}
8595#[doc = "id: 225"]
8596#[doc = "EFI status output."]
8597#[derive(Debug, Clone, PartialEq)]
8598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8600pub struct EFI_STATUS_DATA {
8601    #[doc = "ECU index"]
8602    pub ecu_index: f32,
8603    #[doc = "RPM"]
8604    pub rpm: f32,
8605    #[doc = "Fuel consumed"]
8606    pub fuel_consumed: f32,
8607    #[doc = "Fuel flow rate"]
8608    pub fuel_flow: f32,
8609    #[doc = "Engine load"]
8610    pub engine_load: f32,
8611    #[doc = "Throttle position"]
8612    pub throttle_position: f32,
8613    #[doc = "Spark dwell time"]
8614    pub spark_dwell_time: f32,
8615    #[doc = "Barometric pressure"]
8616    pub barometric_pressure: f32,
8617    #[doc = "Intake manifold pressure("]
8618    pub intake_manifold_pressure: f32,
8619    #[doc = "Intake manifold temperature"]
8620    pub intake_manifold_temperature: f32,
8621    #[doc = "Cylinder head temperature"]
8622    pub cylinder_head_temperature: f32,
8623    #[doc = "Ignition timing (Crank angle degrees)"]
8624    pub ignition_timing: f32,
8625    #[doc = "Injection time"]
8626    pub injection_time: f32,
8627    #[doc = "Exhaust gas temperature"]
8628    pub exhaust_gas_temperature: f32,
8629    #[doc = "Output throttle"]
8630    pub throttle_out: f32,
8631    #[doc = "Pressure/temperature compensation"]
8632    pub pt_compensation: f32,
8633    #[doc = "EFI health status"]
8634    pub health: u8,
8635    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
8636    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8637    pub ignition_voltage: f32,
8638    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
8639    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8640    pub fuel_pressure: f32,
8641}
8642impl EFI_STATUS_DATA {
8643    pub const ENCODED_LEN: usize = 73usize;
8644    pub const DEFAULT: Self = Self {
8645        ecu_index: 0.0_f32,
8646        rpm: 0.0_f32,
8647        fuel_consumed: 0.0_f32,
8648        fuel_flow: 0.0_f32,
8649        engine_load: 0.0_f32,
8650        throttle_position: 0.0_f32,
8651        spark_dwell_time: 0.0_f32,
8652        barometric_pressure: 0.0_f32,
8653        intake_manifold_pressure: 0.0_f32,
8654        intake_manifold_temperature: 0.0_f32,
8655        cylinder_head_temperature: 0.0_f32,
8656        ignition_timing: 0.0_f32,
8657        injection_time: 0.0_f32,
8658        exhaust_gas_temperature: 0.0_f32,
8659        throttle_out: 0.0_f32,
8660        pt_compensation: 0.0_f32,
8661        health: 0_u8,
8662        ignition_voltage: 0.0_f32,
8663        fuel_pressure: 0.0_f32,
8664    };
8665    #[cfg(feature = "arbitrary")]
8666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8667        use arbitrary::{Arbitrary, Unstructured};
8668        let mut buf = [0u8; 1024];
8669        rng.fill_bytes(&mut buf);
8670        let mut unstructured = Unstructured::new(&buf);
8671        Self::arbitrary(&mut unstructured).unwrap_or_default()
8672    }
8673}
8674impl Default for EFI_STATUS_DATA {
8675    fn default() -> Self {
8676        Self::DEFAULT.clone()
8677    }
8678}
8679impl MessageData for EFI_STATUS_DATA {
8680    type Message = MavMessage;
8681    const ID: u32 = 225u32;
8682    const NAME: &'static str = "EFI_STATUS";
8683    const EXTRA_CRC: u8 = 208u8;
8684    const ENCODED_LEN: usize = 73usize;
8685    fn deser(
8686        _version: MavlinkVersion,
8687        __input: &[u8],
8688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8689        let avail_len = __input.len();
8690        let mut payload_buf = [0; Self::ENCODED_LEN];
8691        let mut buf = if avail_len < Self::ENCODED_LEN {
8692            payload_buf[0..avail_len].copy_from_slice(__input);
8693            Bytes::new(&payload_buf)
8694        } else {
8695            Bytes::new(__input)
8696        };
8697        let mut __struct = Self::default();
8698        __struct.ecu_index = buf.get_f32_le();
8699        __struct.rpm = buf.get_f32_le();
8700        __struct.fuel_consumed = buf.get_f32_le();
8701        __struct.fuel_flow = buf.get_f32_le();
8702        __struct.engine_load = buf.get_f32_le();
8703        __struct.throttle_position = buf.get_f32_le();
8704        __struct.spark_dwell_time = buf.get_f32_le();
8705        __struct.barometric_pressure = buf.get_f32_le();
8706        __struct.intake_manifold_pressure = buf.get_f32_le();
8707        __struct.intake_manifold_temperature = buf.get_f32_le();
8708        __struct.cylinder_head_temperature = buf.get_f32_le();
8709        __struct.ignition_timing = buf.get_f32_le();
8710        __struct.injection_time = buf.get_f32_le();
8711        __struct.exhaust_gas_temperature = buf.get_f32_le();
8712        __struct.throttle_out = buf.get_f32_le();
8713        __struct.pt_compensation = buf.get_f32_le();
8714        __struct.health = buf.get_u8();
8715        __struct.ignition_voltage = buf.get_f32_le();
8716        __struct.fuel_pressure = buf.get_f32_le();
8717        Ok(__struct)
8718    }
8719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8720        let mut __tmp = BytesMut::new(bytes);
8721        #[allow(clippy::absurd_extreme_comparisons)]
8722        #[allow(unused_comparisons)]
8723        if __tmp.remaining() < Self::ENCODED_LEN {
8724            panic!(
8725                "buffer is too small (need {} bytes, but got {})",
8726                Self::ENCODED_LEN,
8727                __tmp.remaining(),
8728            )
8729        }
8730        __tmp.put_f32_le(self.ecu_index);
8731        __tmp.put_f32_le(self.rpm);
8732        __tmp.put_f32_le(self.fuel_consumed);
8733        __tmp.put_f32_le(self.fuel_flow);
8734        __tmp.put_f32_le(self.engine_load);
8735        __tmp.put_f32_le(self.throttle_position);
8736        __tmp.put_f32_le(self.spark_dwell_time);
8737        __tmp.put_f32_le(self.barometric_pressure);
8738        __tmp.put_f32_le(self.intake_manifold_pressure);
8739        __tmp.put_f32_le(self.intake_manifold_temperature);
8740        __tmp.put_f32_le(self.cylinder_head_temperature);
8741        __tmp.put_f32_le(self.ignition_timing);
8742        __tmp.put_f32_le(self.injection_time);
8743        __tmp.put_f32_le(self.exhaust_gas_temperature);
8744        __tmp.put_f32_le(self.throttle_out);
8745        __tmp.put_f32_le(self.pt_compensation);
8746        __tmp.put_u8(self.health);
8747        __tmp.put_f32_le(self.ignition_voltage);
8748        __tmp.put_f32_le(self.fuel_pressure);
8749        if matches!(version, MavlinkVersion::V2) {
8750            let len = __tmp.len();
8751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8752        } else {
8753            __tmp.len()
8754        }
8755    }
8756}
8757#[doc = "id: 249"]
8758#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
8759#[derive(Debug, Clone, PartialEq)]
8760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8762pub struct MEMORY_VECT_DATA {
8763    #[doc = "Starting address of the debug variables"]
8764    pub address: u16,
8765    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
8766    pub ver: u8,
8767    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
8768    pub mavtype: u8,
8769    #[doc = "Memory contents at specified address"]
8770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8771    pub value: [i8; 32],
8772}
8773impl MEMORY_VECT_DATA {
8774    pub const ENCODED_LEN: usize = 36usize;
8775    pub const DEFAULT: Self = Self {
8776        address: 0_u16,
8777        ver: 0_u8,
8778        mavtype: 0_u8,
8779        value: [0_i8; 32usize],
8780    };
8781    #[cfg(feature = "arbitrary")]
8782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8783        use arbitrary::{Arbitrary, Unstructured};
8784        let mut buf = [0u8; 1024];
8785        rng.fill_bytes(&mut buf);
8786        let mut unstructured = Unstructured::new(&buf);
8787        Self::arbitrary(&mut unstructured).unwrap_or_default()
8788    }
8789}
8790impl Default for MEMORY_VECT_DATA {
8791    fn default() -> Self {
8792        Self::DEFAULT.clone()
8793    }
8794}
8795impl MessageData for MEMORY_VECT_DATA {
8796    type Message = MavMessage;
8797    const ID: u32 = 249u32;
8798    const NAME: &'static str = "MEMORY_VECT";
8799    const EXTRA_CRC: u8 = 204u8;
8800    const ENCODED_LEN: usize = 36usize;
8801    fn deser(
8802        _version: MavlinkVersion,
8803        __input: &[u8],
8804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8805        let avail_len = __input.len();
8806        let mut payload_buf = [0; Self::ENCODED_LEN];
8807        let mut buf = if avail_len < Self::ENCODED_LEN {
8808            payload_buf[0..avail_len].copy_from_slice(__input);
8809            Bytes::new(&payload_buf)
8810        } else {
8811            Bytes::new(__input)
8812        };
8813        let mut __struct = Self::default();
8814        __struct.address = buf.get_u16_le();
8815        __struct.ver = buf.get_u8();
8816        __struct.mavtype = buf.get_u8();
8817        for v in &mut __struct.value {
8818            let val = buf.get_i8();
8819            *v = val;
8820        }
8821        Ok(__struct)
8822    }
8823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8824        let mut __tmp = BytesMut::new(bytes);
8825        #[allow(clippy::absurd_extreme_comparisons)]
8826        #[allow(unused_comparisons)]
8827        if __tmp.remaining() < Self::ENCODED_LEN {
8828            panic!(
8829                "buffer is too small (need {} bytes, but got {})",
8830                Self::ENCODED_LEN,
8831                __tmp.remaining(),
8832            )
8833        }
8834        __tmp.put_u16_le(self.address);
8835        __tmp.put_u8(self.ver);
8836        __tmp.put_u8(self.mavtype);
8837        for val in &self.value {
8838            __tmp.put_i8(*val);
8839        }
8840        if matches!(version, MavlinkVersion::V2) {
8841            let len = __tmp.len();
8842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8843        } else {
8844            __tmp.len()
8845        }
8846    }
8847}
8848#[doc = "id: 267"]
8849#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
8850#[derive(Debug, Clone, PartialEq)]
8851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8853pub struct LOGGING_DATA_ACKED_DATA {
8854    #[doc = "sequence number (can wrap)"]
8855    pub sequence: u16,
8856    #[doc = "system ID of the target"]
8857    pub target_system: u8,
8858    #[doc = "component ID of the target"]
8859    pub target_component: u8,
8860    #[doc = "data length"]
8861    pub length: u8,
8862    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
8863    pub first_message_offset: u8,
8864    #[doc = "logged data"]
8865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8866    pub data: [u8; 249],
8867}
8868impl LOGGING_DATA_ACKED_DATA {
8869    pub const ENCODED_LEN: usize = 255usize;
8870    pub const DEFAULT: Self = Self {
8871        sequence: 0_u16,
8872        target_system: 0_u8,
8873        target_component: 0_u8,
8874        length: 0_u8,
8875        first_message_offset: 0_u8,
8876        data: [0_u8; 249usize],
8877    };
8878    #[cfg(feature = "arbitrary")]
8879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8880        use arbitrary::{Arbitrary, Unstructured};
8881        let mut buf = [0u8; 1024];
8882        rng.fill_bytes(&mut buf);
8883        let mut unstructured = Unstructured::new(&buf);
8884        Self::arbitrary(&mut unstructured).unwrap_or_default()
8885    }
8886}
8887impl Default for LOGGING_DATA_ACKED_DATA {
8888    fn default() -> Self {
8889        Self::DEFAULT.clone()
8890    }
8891}
8892impl MessageData for LOGGING_DATA_ACKED_DATA {
8893    type Message = MavMessage;
8894    const ID: u32 = 267u32;
8895    const NAME: &'static str = "LOGGING_DATA_ACKED";
8896    const EXTRA_CRC: u8 = 35u8;
8897    const ENCODED_LEN: usize = 255usize;
8898    fn deser(
8899        _version: MavlinkVersion,
8900        __input: &[u8],
8901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8902        let avail_len = __input.len();
8903        let mut payload_buf = [0; Self::ENCODED_LEN];
8904        let mut buf = if avail_len < Self::ENCODED_LEN {
8905            payload_buf[0..avail_len].copy_from_slice(__input);
8906            Bytes::new(&payload_buf)
8907        } else {
8908            Bytes::new(__input)
8909        };
8910        let mut __struct = Self::default();
8911        __struct.sequence = buf.get_u16_le();
8912        __struct.target_system = buf.get_u8();
8913        __struct.target_component = buf.get_u8();
8914        __struct.length = buf.get_u8();
8915        __struct.first_message_offset = buf.get_u8();
8916        for v in &mut __struct.data {
8917            let val = buf.get_u8();
8918            *v = val;
8919        }
8920        Ok(__struct)
8921    }
8922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8923        let mut __tmp = BytesMut::new(bytes);
8924        #[allow(clippy::absurd_extreme_comparisons)]
8925        #[allow(unused_comparisons)]
8926        if __tmp.remaining() < Self::ENCODED_LEN {
8927            panic!(
8928                "buffer is too small (need {} bytes, but got {})",
8929                Self::ENCODED_LEN,
8930                __tmp.remaining(),
8931            )
8932        }
8933        __tmp.put_u16_le(self.sequence);
8934        __tmp.put_u8(self.target_system);
8935        __tmp.put_u8(self.target_component);
8936        __tmp.put_u8(self.length);
8937        __tmp.put_u8(self.first_message_offset);
8938        for val in &self.data {
8939            __tmp.put_u8(*val);
8940        }
8941        if matches!(version, MavlinkVersion::V2) {
8942            let len = __tmp.len();
8943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8944        } else {
8945            __tmp.len()
8946        }
8947    }
8948}
8949#[doc = "id: 110"]
8950#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
8951#[derive(Debug, Clone, PartialEq)]
8952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8954pub struct FILE_TRANSFER_PROTOCOL_DATA {
8955    #[doc = "Network ID (0 for broadcast)"]
8956    pub target_network: u8,
8957    #[doc = "System ID (0 for broadcast)"]
8958    pub target_system: u8,
8959    #[doc = "Component ID (0 for broadcast)"]
8960    pub target_component: u8,
8961    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
8962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8963    pub payload: [u8; 251],
8964}
8965impl FILE_TRANSFER_PROTOCOL_DATA {
8966    pub const ENCODED_LEN: usize = 254usize;
8967    pub const DEFAULT: Self = Self {
8968        target_network: 0_u8,
8969        target_system: 0_u8,
8970        target_component: 0_u8,
8971        payload: [0_u8; 251usize],
8972    };
8973    #[cfg(feature = "arbitrary")]
8974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8975        use arbitrary::{Arbitrary, Unstructured};
8976        let mut buf = [0u8; 1024];
8977        rng.fill_bytes(&mut buf);
8978        let mut unstructured = Unstructured::new(&buf);
8979        Self::arbitrary(&mut unstructured).unwrap_or_default()
8980    }
8981}
8982impl Default for FILE_TRANSFER_PROTOCOL_DATA {
8983    fn default() -> Self {
8984        Self::DEFAULT.clone()
8985    }
8986}
8987impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
8988    type Message = MavMessage;
8989    const ID: u32 = 110u32;
8990    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
8991    const EXTRA_CRC: u8 = 84u8;
8992    const ENCODED_LEN: usize = 254usize;
8993    fn deser(
8994        _version: MavlinkVersion,
8995        __input: &[u8],
8996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8997        let avail_len = __input.len();
8998        let mut payload_buf = [0; Self::ENCODED_LEN];
8999        let mut buf = if avail_len < Self::ENCODED_LEN {
9000            payload_buf[0..avail_len].copy_from_slice(__input);
9001            Bytes::new(&payload_buf)
9002        } else {
9003            Bytes::new(__input)
9004        };
9005        let mut __struct = Self::default();
9006        __struct.target_network = buf.get_u8();
9007        __struct.target_system = buf.get_u8();
9008        __struct.target_component = buf.get_u8();
9009        for v in &mut __struct.payload {
9010            let val = buf.get_u8();
9011            *v = val;
9012        }
9013        Ok(__struct)
9014    }
9015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9016        let mut __tmp = BytesMut::new(bytes);
9017        #[allow(clippy::absurd_extreme_comparisons)]
9018        #[allow(unused_comparisons)]
9019        if __tmp.remaining() < Self::ENCODED_LEN {
9020            panic!(
9021                "buffer is too small (need {} bytes, but got {})",
9022                Self::ENCODED_LEN,
9023                __tmp.remaining(),
9024            )
9025        }
9026        __tmp.put_u8(self.target_network);
9027        __tmp.put_u8(self.target_system);
9028        __tmp.put_u8(self.target_component);
9029        for val in &self.payload {
9030            __tmp.put_u8(*val);
9031        }
9032        if matches!(version, MavlinkVersion::V2) {
9033            let len = __tmp.len();
9034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9035        } else {
9036            __tmp.len()
9037        }
9038    }
9039}
9040#[doc = "id: 380"]
9041#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
9042#[derive(Debug, Clone, PartialEq)]
9043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9045pub struct TIME_ESTIMATE_TO_TARGET_DATA {
9046    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
9047    pub safe_return: i32,
9048    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
9049    pub land: i32,
9050    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
9051    pub mission_next_item: i32,
9052    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
9053    pub mission_end: i32,
9054    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
9055    pub commanded_action: i32,
9056}
9057impl TIME_ESTIMATE_TO_TARGET_DATA {
9058    pub const ENCODED_LEN: usize = 20usize;
9059    pub const DEFAULT: Self = Self {
9060        safe_return: 0_i32,
9061        land: 0_i32,
9062        mission_next_item: 0_i32,
9063        mission_end: 0_i32,
9064        commanded_action: 0_i32,
9065    };
9066    #[cfg(feature = "arbitrary")]
9067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9068        use arbitrary::{Arbitrary, Unstructured};
9069        let mut buf = [0u8; 1024];
9070        rng.fill_bytes(&mut buf);
9071        let mut unstructured = Unstructured::new(&buf);
9072        Self::arbitrary(&mut unstructured).unwrap_or_default()
9073    }
9074}
9075impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
9076    fn default() -> Self {
9077        Self::DEFAULT.clone()
9078    }
9079}
9080impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
9081    type Message = MavMessage;
9082    const ID: u32 = 380u32;
9083    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
9084    const EXTRA_CRC: u8 = 232u8;
9085    const ENCODED_LEN: usize = 20usize;
9086    fn deser(
9087        _version: MavlinkVersion,
9088        __input: &[u8],
9089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9090        let avail_len = __input.len();
9091        let mut payload_buf = [0; Self::ENCODED_LEN];
9092        let mut buf = if avail_len < Self::ENCODED_LEN {
9093            payload_buf[0..avail_len].copy_from_slice(__input);
9094            Bytes::new(&payload_buf)
9095        } else {
9096            Bytes::new(__input)
9097        };
9098        let mut __struct = Self::default();
9099        __struct.safe_return = buf.get_i32_le();
9100        __struct.land = buf.get_i32_le();
9101        __struct.mission_next_item = buf.get_i32_le();
9102        __struct.mission_end = buf.get_i32_le();
9103        __struct.commanded_action = buf.get_i32_le();
9104        Ok(__struct)
9105    }
9106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9107        let mut __tmp = BytesMut::new(bytes);
9108        #[allow(clippy::absurd_extreme_comparisons)]
9109        #[allow(unused_comparisons)]
9110        if __tmp.remaining() < Self::ENCODED_LEN {
9111            panic!(
9112                "buffer is too small (need {} bytes, but got {})",
9113                Self::ENCODED_LEN,
9114                __tmp.remaining(),
9115            )
9116        }
9117        __tmp.put_i32_le(self.safe_return);
9118        __tmp.put_i32_le(self.land);
9119        __tmp.put_i32_le(self.mission_next_item);
9120        __tmp.put_i32_le(self.mission_end);
9121        __tmp.put_i32_le(self.commanded_action);
9122        if matches!(version, MavlinkVersion::V2) {
9123            let len = __tmp.len();
9124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9125        } else {
9126            __tmp.len()
9127        }
9128    }
9129}
9130#[doc = "id: 261"]
9131#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
9132#[derive(Debug, Clone, PartialEq)]
9133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9135pub struct STORAGE_INFORMATION_DATA {
9136    #[doc = "Timestamp (time since system boot)."]
9137    pub time_boot_ms: u32,
9138    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
9139    pub total_capacity: f32,
9140    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
9141    pub used_capacity: f32,
9142    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
9143    pub available_capacity: f32,
9144    #[doc = "Read speed."]
9145    pub read_speed: f32,
9146    #[doc = "Write speed."]
9147    pub write_speed: f32,
9148    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
9149    pub storage_id: u8,
9150    #[doc = "Number of storage devices"]
9151    pub storage_count: u8,
9152    #[doc = "Status of storage"]
9153    pub status: StorageStatus,
9154    #[doc = "Type of storage"]
9155    #[cfg_attr(feature = "serde", serde(default))]
9156    pub mavtype: StorageType,
9157    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
9158    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9159    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9160    pub name: [u8; 32],
9161    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
9162    #[cfg_attr(feature = "serde", serde(default))]
9163    pub storage_usage: StorageUsageFlag,
9164}
9165impl STORAGE_INFORMATION_DATA {
9166    pub const ENCODED_LEN: usize = 61usize;
9167    pub const DEFAULT: Self = Self {
9168        time_boot_ms: 0_u32,
9169        total_capacity: 0.0_f32,
9170        used_capacity: 0.0_f32,
9171        available_capacity: 0.0_f32,
9172        read_speed: 0.0_f32,
9173        write_speed: 0.0_f32,
9174        storage_id: 0_u8,
9175        storage_count: 0_u8,
9176        status: StorageStatus::DEFAULT,
9177        mavtype: StorageType::DEFAULT,
9178        name: [0_u8; 32usize],
9179        storage_usage: StorageUsageFlag::DEFAULT,
9180    };
9181    #[cfg(feature = "arbitrary")]
9182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9183        use arbitrary::{Arbitrary, Unstructured};
9184        let mut buf = [0u8; 1024];
9185        rng.fill_bytes(&mut buf);
9186        let mut unstructured = Unstructured::new(&buf);
9187        Self::arbitrary(&mut unstructured).unwrap_or_default()
9188    }
9189}
9190impl Default for STORAGE_INFORMATION_DATA {
9191    fn default() -> Self {
9192        Self::DEFAULT.clone()
9193    }
9194}
9195impl MessageData for STORAGE_INFORMATION_DATA {
9196    type Message = MavMessage;
9197    const ID: u32 = 261u32;
9198    const NAME: &'static str = "STORAGE_INFORMATION";
9199    const EXTRA_CRC: u8 = 179u8;
9200    const ENCODED_LEN: usize = 61usize;
9201    fn deser(
9202        _version: MavlinkVersion,
9203        __input: &[u8],
9204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9205        let avail_len = __input.len();
9206        let mut payload_buf = [0; Self::ENCODED_LEN];
9207        let mut buf = if avail_len < Self::ENCODED_LEN {
9208            payload_buf[0..avail_len].copy_from_slice(__input);
9209            Bytes::new(&payload_buf)
9210        } else {
9211            Bytes::new(__input)
9212        };
9213        let mut __struct = Self::default();
9214        __struct.time_boot_ms = buf.get_u32_le();
9215        __struct.total_capacity = buf.get_f32_le();
9216        __struct.used_capacity = buf.get_f32_le();
9217        __struct.available_capacity = buf.get_f32_le();
9218        __struct.read_speed = buf.get_f32_le();
9219        __struct.write_speed = buf.get_f32_le();
9220        __struct.storage_id = buf.get_u8();
9221        __struct.storage_count = buf.get_u8();
9222        let tmp = buf.get_u8();
9223        __struct.status =
9224            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9225                enum_type: "StorageStatus",
9226                value: tmp as u32,
9227            })?;
9228        let tmp = buf.get_u8();
9229        __struct.mavtype =
9230            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9231                enum_type: "StorageType",
9232                value: tmp as u32,
9233            })?;
9234        for v in &mut __struct.name {
9235            let val = buf.get_u8();
9236            *v = val;
9237        }
9238        let tmp = buf.get_u8();
9239        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
9240            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9241                flag_type: "StorageUsageFlag",
9242                value: tmp as u32,
9243            })?;
9244        Ok(__struct)
9245    }
9246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9247        let mut __tmp = BytesMut::new(bytes);
9248        #[allow(clippy::absurd_extreme_comparisons)]
9249        #[allow(unused_comparisons)]
9250        if __tmp.remaining() < Self::ENCODED_LEN {
9251            panic!(
9252                "buffer is too small (need {} bytes, but got {})",
9253                Self::ENCODED_LEN,
9254                __tmp.remaining(),
9255            )
9256        }
9257        __tmp.put_u32_le(self.time_boot_ms);
9258        __tmp.put_f32_le(self.total_capacity);
9259        __tmp.put_f32_le(self.used_capacity);
9260        __tmp.put_f32_le(self.available_capacity);
9261        __tmp.put_f32_le(self.read_speed);
9262        __tmp.put_f32_le(self.write_speed);
9263        __tmp.put_u8(self.storage_id);
9264        __tmp.put_u8(self.storage_count);
9265        __tmp.put_u8(self.status as u8);
9266        __tmp.put_u8(self.mavtype as u8);
9267        for val in &self.name {
9268            __tmp.put_u8(*val);
9269        }
9270        __tmp.put_u8(self.storage_usage.bits());
9271        if matches!(version, MavlinkVersion::V2) {
9272            let len = __tmp.len();
9273            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9274        } else {
9275            __tmp.len()
9276        }
9277    }
9278}
9279#[doc = "id: 20"]
9280#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
9281#[derive(Debug, Clone, PartialEq)]
9282#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9283#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9284pub struct PARAM_REQUEST_READ_DATA {
9285    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
9286    pub param_index: i16,
9287    #[doc = "System ID"]
9288    pub target_system: u8,
9289    #[doc = "Component ID"]
9290    pub target_component: u8,
9291    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
9292    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9293    pub param_id: [u8; 16],
9294}
9295impl PARAM_REQUEST_READ_DATA {
9296    pub const ENCODED_LEN: usize = 20usize;
9297    pub const DEFAULT: Self = Self {
9298        param_index: 0_i16,
9299        target_system: 0_u8,
9300        target_component: 0_u8,
9301        param_id: [0_u8; 16usize],
9302    };
9303    #[cfg(feature = "arbitrary")]
9304    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9305        use arbitrary::{Arbitrary, Unstructured};
9306        let mut buf = [0u8; 1024];
9307        rng.fill_bytes(&mut buf);
9308        let mut unstructured = Unstructured::new(&buf);
9309        Self::arbitrary(&mut unstructured).unwrap_or_default()
9310    }
9311}
9312impl Default for PARAM_REQUEST_READ_DATA {
9313    fn default() -> Self {
9314        Self::DEFAULT.clone()
9315    }
9316}
9317impl MessageData for PARAM_REQUEST_READ_DATA {
9318    type Message = MavMessage;
9319    const ID: u32 = 20u32;
9320    const NAME: &'static str = "PARAM_REQUEST_READ";
9321    const EXTRA_CRC: u8 = 214u8;
9322    const ENCODED_LEN: usize = 20usize;
9323    fn deser(
9324        _version: MavlinkVersion,
9325        __input: &[u8],
9326    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9327        let avail_len = __input.len();
9328        let mut payload_buf = [0; Self::ENCODED_LEN];
9329        let mut buf = if avail_len < Self::ENCODED_LEN {
9330            payload_buf[0..avail_len].copy_from_slice(__input);
9331            Bytes::new(&payload_buf)
9332        } else {
9333            Bytes::new(__input)
9334        };
9335        let mut __struct = Self::default();
9336        __struct.param_index = buf.get_i16_le();
9337        __struct.target_system = buf.get_u8();
9338        __struct.target_component = buf.get_u8();
9339        for v in &mut __struct.param_id {
9340            let val = buf.get_u8();
9341            *v = val;
9342        }
9343        Ok(__struct)
9344    }
9345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9346        let mut __tmp = BytesMut::new(bytes);
9347        #[allow(clippy::absurd_extreme_comparisons)]
9348        #[allow(unused_comparisons)]
9349        if __tmp.remaining() < Self::ENCODED_LEN {
9350            panic!(
9351                "buffer is too small (need {} bytes, but got {})",
9352                Self::ENCODED_LEN,
9353                __tmp.remaining(),
9354            )
9355        }
9356        __tmp.put_i16_le(self.param_index);
9357        __tmp.put_u8(self.target_system);
9358        __tmp.put_u8(self.target_component);
9359        for val in &self.param_id {
9360            __tmp.put_u8(*val);
9361        }
9362        if matches!(version, MavlinkVersion::V2) {
9363            let len = __tmp.len();
9364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9365        } else {
9366            __tmp.len()
9367        }
9368    }
9369}
9370#[doc = "id: 54"]
9371#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
9372#[derive(Debug, Clone, PartialEq)]
9373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9375pub struct SAFETY_SET_ALLOWED_AREA_DATA {
9376    #[doc = "x position 1 / Latitude 1"]
9377    pub p1x: f32,
9378    #[doc = "y position 1 / Longitude 1"]
9379    pub p1y: f32,
9380    #[doc = "z position 1 / Altitude 1"]
9381    pub p1z: f32,
9382    #[doc = "x position 2 / Latitude 2"]
9383    pub p2x: f32,
9384    #[doc = "y position 2 / Longitude 2"]
9385    pub p2y: f32,
9386    #[doc = "z position 2 / Altitude 2"]
9387    pub p2z: f32,
9388    #[doc = "System ID"]
9389    pub target_system: u8,
9390    #[doc = "Component ID"]
9391    pub target_component: u8,
9392    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
9393    pub frame: MavFrame,
9394}
9395impl SAFETY_SET_ALLOWED_AREA_DATA {
9396    pub const ENCODED_LEN: usize = 27usize;
9397    pub const DEFAULT: Self = Self {
9398        p1x: 0.0_f32,
9399        p1y: 0.0_f32,
9400        p1z: 0.0_f32,
9401        p2x: 0.0_f32,
9402        p2y: 0.0_f32,
9403        p2z: 0.0_f32,
9404        target_system: 0_u8,
9405        target_component: 0_u8,
9406        frame: MavFrame::DEFAULT,
9407    };
9408    #[cfg(feature = "arbitrary")]
9409    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9410        use arbitrary::{Arbitrary, Unstructured};
9411        let mut buf = [0u8; 1024];
9412        rng.fill_bytes(&mut buf);
9413        let mut unstructured = Unstructured::new(&buf);
9414        Self::arbitrary(&mut unstructured).unwrap_or_default()
9415    }
9416}
9417impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
9418    fn default() -> Self {
9419        Self::DEFAULT.clone()
9420    }
9421}
9422impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
9423    type Message = MavMessage;
9424    const ID: u32 = 54u32;
9425    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
9426    const EXTRA_CRC: u8 = 15u8;
9427    const ENCODED_LEN: usize = 27usize;
9428    fn deser(
9429        _version: MavlinkVersion,
9430        __input: &[u8],
9431    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9432        let avail_len = __input.len();
9433        let mut payload_buf = [0; Self::ENCODED_LEN];
9434        let mut buf = if avail_len < Self::ENCODED_LEN {
9435            payload_buf[0..avail_len].copy_from_slice(__input);
9436            Bytes::new(&payload_buf)
9437        } else {
9438            Bytes::new(__input)
9439        };
9440        let mut __struct = Self::default();
9441        __struct.p1x = buf.get_f32_le();
9442        __struct.p1y = buf.get_f32_le();
9443        __struct.p1z = buf.get_f32_le();
9444        __struct.p2x = buf.get_f32_le();
9445        __struct.p2y = buf.get_f32_le();
9446        __struct.p2z = buf.get_f32_le();
9447        __struct.target_system = buf.get_u8();
9448        __struct.target_component = buf.get_u8();
9449        let tmp = buf.get_u8();
9450        __struct.frame =
9451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9452                enum_type: "MavFrame",
9453                value: tmp as u32,
9454            })?;
9455        Ok(__struct)
9456    }
9457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9458        let mut __tmp = BytesMut::new(bytes);
9459        #[allow(clippy::absurd_extreme_comparisons)]
9460        #[allow(unused_comparisons)]
9461        if __tmp.remaining() < Self::ENCODED_LEN {
9462            panic!(
9463                "buffer is too small (need {} bytes, but got {})",
9464                Self::ENCODED_LEN,
9465                __tmp.remaining(),
9466            )
9467        }
9468        __tmp.put_f32_le(self.p1x);
9469        __tmp.put_f32_le(self.p1y);
9470        __tmp.put_f32_le(self.p1z);
9471        __tmp.put_f32_le(self.p2x);
9472        __tmp.put_f32_le(self.p2y);
9473        __tmp.put_f32_le(self.p2z);
9474        __tmp.put_u8(self.target_system);
9475        __tmp.put_u8(self.target_component);
9476        __tmp.put_u8(self.frame as u8);
9477        if matches!(version, MavlinkVersion::V2) {
9478            let len = __tmp.len();
9479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9480        } else {
9481            __tmp.len()
9482        }
9483    }
9484}
9485#[doc = "id: 241"]
9486#[doc = "Vibration levels and accelerometer clipping."]
9487#[derive(Debug, Clone, PartialEq)]
9488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9490pub struct VIBRATION_DATA {
9491    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9492    pub time_usec: u64,
9493    #[doc = "Vibration levels on X-axis"]
9494    pub vibration_x: f32,
9495    #[doc = "Vibration levels on Y-axis"]
9496    pub vibration_y: f32,
9497    #[doc = "Vibration levels on Z-axis"]
9498    pub vibration_z: f32,
9499    #[doc = "first accelerometer clipping count"]
9500    pub clipping_0: u32,
9501    #[doc = "second accelerometer clipping count"]
9502    pub clipping_1: u32,
9503    #[doc = "third accelerometer clipping count"]
9504    pub clipping_2: u32,
9505}
9506impl VIBRATION_DATA {
9507    pub const ENCODED_LEN: usize = 32usize;
9508    pub const DEFAULT: Self = Self {
9509        time_usec: 0_u64,
9510        vibration_x: 0.0_f32,
9511        vibration_y: 0.0_f32,
9512        vibration_z: 0.0_f32,
9513        clipping_0: 0_u32,
9514        clipping_1: 0_u32,
9515        clipping_2: 0_u32,
9516    };
9517    #[cfg(feature = "arbitrary")]
9518    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9519        use arbitrary::{Arbitrary, Unstructured};
9520        let mut buf = [0u8; 1024];
9521        rng.fill_bytes(&mut buf);
9522        let mut unstructured = Unstructured::new(&buf);
9523        Self::arbitrary(&mut unstructured).unwrap_or_default()
9524    }
9525}
9526impl Default for VIBRATION_DATA {
9527    fn default() -> Self {
9528        Self::DEFAULT.clone()
9529    }
9530}
9531impl MessageData for VIBRATION_DATA {
9532    type Message = MavMessage;
9533    const ID: u32 = 241u32;
9534    const NAME: &'static str = "VIBRATION";
9535    const EXTRA_CRC: u8 = 90u8;
9536    const ENCODED_LEN: usize = 32usize;
9537    fn deser(
9538        _version: MavlinkVersion,
9539        __input: &[u8],
9540    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9541        let avail_len = __input.len();
9542        let mut payload_buf = [0; Self::ENCODED_LEN];
9543        let mut buf = if avail_len < Self::ENCODED_LEN {
9544            payload_buf[0..avail_len].copy_from_slice(__input);
9545            Bytes::new(&payload_buf)
9546        } else {
9547            Bytes::new(__input)
9548        };
9549        let mut __struct = Self::default();
9550        __struct.time_usec = buf.get_u64_le();
9551        __struct.vibration_x = buf.get_f32_le();
9552        __struct.vibration_y = buf.get_f32_le();
9553        __struct.vibration_z = buf.get_f32_le();
9554        __struct.clipping_0 = buf.get_u32_le();
9555        __struct.clipping_1 = buf.get_u32_le();
9556        __struct.clipping_2 = buf.get_u32_le();
9557        Ok(__struct)
9558    }
9559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9560        let mut __tmp = BytesMut::new(bytes);
9561        #[allow(clippy::absurd_extreme_comparisons)]
9562        #[allow(unused_comparisons)]
9563        if __tmp.remaining() < Self::ENCODED_LEN {
9564            panic!(
9565                "buffer is too small (need {} bytes, but got {})",
9566                Self::ENCODED_LEN,
9567                __tmp.remaining(),
9568            )
9569        }
9570        __tmp.put_u64_le(self.time_usec);
9571        __tmp.put_f32_le(self.vibration_x);
9572        __tmp.put_f32_le(self.vibration_y);
9573        __tmp.put_f32_le(self.vibration_z);
9574        __tmp.put_u32_le(self.clipping_0);
9575        __tmp.put_u32_le(self.clipping_1);
9576        __tmp.put_u32_le(self.clipping_2);
9577        if matches!(version, MavlinkVersion::V2) {
9578            let len = __tmp.len();
9579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9580        } else {
9581            __tmp.len()
9582        }
9583    }
9584}
9585#[doc = "id: 22"]
9586#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
9587#[derive(Debug, Clone, PartialEq)]
9588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9590pub struct PARAM_VALUE_DATA {
9591    #[doc = "Onboard parameter value"]
9592    pub param_value: f32,
9593    #[doc = "Total number of onboard parameters"]
9594    pub param_count: u16,
9595    #[doc = "Index of this onboard parameter"]
9596    pub param_index: u16,
9597    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
9598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9599    pub param_id: [u8; 16],
9600    #[doc = "Onboard parameter type."]
9601    pub param_type: MavParamType,
9602}
9603impl PARAM_VALUE_DATA {
9604    pub const ENCODED_LEN: usize = 25usize;
9605    pub const DEFAULT: Self = Self {
9606        param_value: 0.0_f32,
9607        param_count: 0_u16,
9608        param_index: 0_u16,
9609        param_id: [0_u8; 16usize],
9610        param_type: MavParamType::DEFAULT,
9611    };
9612    #[cfg(feature = "arbitrary")]
9613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9614        use arbitrary::{Arbitrary, Unstructured};
9615        let mut buf = [0u8; 1024];
9616        rng.fill_bytes(&mut buf);
9617        let mut unstructured = Unstructured::new(&buf);
9618        Self::arbitrary(&mut unstructured).unwrap_or_default()
9619    }
9620}
9621impl Default for PARAM_VALUE_DATA {
9622    fn default() -> Self {
9623        Self::DEFAULT.clone()
9624    }
9625}
9626impl MessageData for PARAM_VALUE_DATA {
9627    type Message = MavMessage;
9628    const ID: u32 = 22u32;
9629    const NAME: &'static str = "PARAM_VALUE";
9630    const EXTRA_CRC: u8 = 220u8;
9631    const ENCODED_LEN: usize = 25usize;
9632    fn deser(
9633        _version: MavlinkVersion,
9634        __input: &[u8],
9635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9636        let avail_len = __input.len();
9637        let mut payload_buf = [0; Self::ENCODED_LEN];
9638        let mut buf = if avail_len < Self::ENCODED_LEN {
9639            payload_buf[0..avail_len].copy_from_slice(__input);
9640            Bytes::new(&payload_buf)
9641        } else {
9642            Bytes::new(__input)
9643        };
9644        let mut __struct = Self::default();
9645        __struct.param_value = buf.get_f32_le();
9646        __struct.param_count = buf.get_u16_le();
9647        __struct.param_index = buf.get_u16_le();
9648        for v in &mut __struct.param_id {
9649            let val = buf.get_u8();
9650            *v = val;
9651        }
9652        let tmp = buf.get_u8();
9653        __struct.param_type =
9654            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9655                enum_type: "MavParamType",
9656                value: tmp as u32,
9657            })?;
9658        Ok(__struct)
9659    }
9660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9661        let mut __tmp = BytesMut::new(bytes);
9662        #[allow(clippy::absurd_extreme_comparisons)]
9663        #[allow(unused_comparisons)]
9664        if __tmp.remaining() < Self::ENCODED_LEN {
9665            panic!(
9666                "buffer is too small (need {} bytes, but got {})",
9667                Self::ENCODED_LEN,
9668                __tmp.remaining(),
9669            )
9670        }
9671        __tmp.put_f32_le(self.param_value);
9672        __tmp.put_u16_le(self.param_count);
9673        __tmp.put_u16_le(self.param_index);
9674        for val in &self.param_id {
9675            __tmp.put_u8(*val);
9676        }
9677        __tmp.put_u8(self.param_type as u8);
9678        if matches!(version, MavlinkVersion::V2) {
9679            let len = __tmp.len();
9680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9681        } else {
9682            __tmp.len()
9683        }
9684    }
9685}
9686#[doc = "id: 335"]
9687#[doc = "Status of the Iridium SBD link."]
9688#[derive(Debug, Clone, PartialEq)]
9689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9691pub struct ISBD_LINK_STATUS_DATA {
9692    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9693    pub timestamp: u64,
9694    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9695    pub last_heartbeat: u64,
9696    #[doc = "Number of failed SBD sessions."]
9697    pub failed_sessions: u16,
9698    #[doc = "Number of successful SBD sessions."]
9699    pub successful_sessions: u16,
9700    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
9701    pub signal_quality: u8,
9702    #[doc = "1: Ring call pending, 0: No call pending."]
9703    pub ring_pending: u8,
9704    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
9705    pub tx_session_pending: u8,
9706    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
9707    pub rx_session_pending: u8,
9708}
9709impl ISBD_LINK_STATUS_DATA {
9710    pub const ENCODED_LEN: usize = 24usize;
9711    pub const DEFAULT: Self = Self {
9712        timestamp: 0_u64,
9713        last_heartbeat: 0_u64,
9714        failed_sessions: 0_u16,
9715        successful_sessions: 0_u16,
9716        signal_quality: 0_u8,
9717        ring_pending: 0_u8,
9718        tx_session_pending: 0_u8,
9719        rx_session_pending: 0_u8,
9720    };
9721    #[cfg(feature = "arbitrary")]
9722    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9723        use arbitrary::{Arbitrary, Unstructured};
9724        let mut buf = [0u8; 1024];
9725        rng.fill_bytes(&mut buf);
9726        let mut unstructured = Unstructured::new(&buf);
9727        Self::arbitrary(&mut unstructured).unwrap_or_default()
9728    }
9729}
9730impl Default for ISBD_LINK_STATUS_DATA {
9731    fn default() -> Self {
9732        Self::DEFAULT.clone()
9733    }
9734}
9735impl MessageData for ISBD_LINK_STATUS_DATA {
9736    type Message = MavMessage;
9737    const ID: u32 = 335u32;
9738    const NAME: &'static str = "ISBD_LINK_STATUS";
9739    const EXTRA_CRC: u8 = 225u8;
9740    const ENCODED_LEN: usize = 24usize;
9741    fn deser(
9742        _version: MavlinkVersion,
9743        __input: &[u8],
9744    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9745        let avail_len = __input.len();
9746        let mut payload_buf = [0; Self::ENCODED_LEN];
9747        let mut buf = if avail_len < Self::ENCODED_LEN {
9748            payload_buf[0..avail_len].copy_from_slice(__input);
9749            Bytes::new(&payload_buf)
9750        } else {
9751            Bytes::new(__input)
9752        };
9753        let mut __struct = Self::default();
9754        __struct.timestamp = buf.get_u64_le();
9755        __struct.last_heartbeat = buf.get_u64_le();
9756        __struct.failed_sessions = buf.get_u16_le();
9757        __struct.successful_sessions = buf.get_u16_le();
9758        __struct.signal_quality = buf.get_u8();
9759        __struct.ring_pending = buf.get_u8();
9760        __struct.tx_session_pending = buf.get_u8();
9761        __struct.rx_session_pending = buf.get_u8();
9762        Ok(__struct)
9763    }
9764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9765        let mut __tmp = BytesMut::new(bytes);
9766        #[allow(clippy::absurd_extreme_comparisons)]
9767        #[allow(unused_comparisons)]
9768        if __tmp.remaining() < Self::ENCODED_LEN {
9769            panic!(
9770                "buffer is too small (need {} bytes, but got {})",
9771                Self::ENCODED_LEN,
9772                __tmp.remaining(),
9773            )
9774        }
9775        __tmp.put_u64_le(self.timestamp);
9776        __tmp.put_u64_le(self.last_heartbeat);
9777        __tmp.put_u16_le(self.failed_sessions);
9778        __tmp.put_u16_le(self.successful_sessions);
9779        __tmp.put_u8(self.signal_quality);
9780        __tmp.put_u8(self.ring_pending);
9781        __tmp.put_u8(self.tx_session_pending);
9782        __tmp.put_u8(self.rx_session_pending);
9783        if matches!(version, MavlinkVersion::V2) {
9784            let len = __tmp.len();
9785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9786        } else {
9787            __tmp.len()
9788        }
9789    }
9790}
9791#[doc = "id: 12905"]
9792#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
9793#[derive(Debug, Clone, PartialEq)]
9794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9796pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
9797    #[doc = "System ID (0 for broadcast)."]
9798    pub target_system: u8,
9799    #[doc = "Component ID (0 for broadcast)."]
9800    pub target_component: u8,
9801    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
9802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9803    pub id_or_mac: [u8; 20],
9804    #[doc = "Indicates the type of the operator_id field."]
9805    pub operator_id_type: MavOdidOperatorIdType,
9806    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
9807    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9808    pub operator_id: [u8; 20],
9809}
9810impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
9811    pub const ENCODED_LEN: usize = 43usize;
9812    pub const DEFAULT: Self = Self {
9813        target_system: 0_u8,
9814        target_component: 0_u8,
9815        id_or_mac: [0_u8; 20usize],
9816        operator_id_type: MavOdidOperatorIdType::DEFAULT,
9817        operator_id: [0_u8; 20usize],
9818    };
9819    #[cfg(feature = "arbitrary")]
9820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9821        use arbitrary::{Arbitrary, Unstructured};
9822        let mut buf = [0u8; 1024];
9823        rng.fill_bytes(&mut buf);
9824        let mut unstructured = Unstructured::new(&buf);
9825        Self::arbitrary(&mut unstructured).unwrap_or_default()
9826    }
9827}
9828impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
9829    fn default() -> Self {
9830        Self::DEFAULT.clone()
9831    }
9832}
9833impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
9834    type Message = MavMessage;
9835    const ID: u32 = 12905u32;
9836    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
9837    const EXTRA_CRC: u8 = 49u8;
9838    const ENCODED_LEN: usize = 43usize;
9839    fn deser(
9840        _version: MavlinkVersion,
9841        __input: &[u8],
9842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9843        let avail_len = __input.len();
9844        let mut payload_buf = [0; Self::ENCODED_LEN];
9845        let mut buf = if avail_len < Self::ENCODED_LEN {
9846            payload_buf[0..avail_len].copy_from_slice(__input);
9847            Bytes::new(&payload_buf)
9848        } else {
9849            Bytes::new(__input)
9850        };
9851        let mut __struct = Self::default();
9852        __struct.target_system = buf.get_u8();
9853        __struct.target_component = buf.get_u8();
9854        for v in &mut __struct.id_or_mac {
9855            let val = buf.get_u8();
9856            *v = val;
9857        }
9858        let tmp = buf.get_u8();
9859        __struct.operator_id_type =
9860            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9861                enum_type: "MavOdidOperatorIdType",
9862                value: tmp as u32,
9863            })?;
9864        for v in &mut __struct.operator_id {
9865            let val = buf.get_u8();
9866            *v = val;
9867        }
9868        Ok(__struct)
9869    }
9870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9871        let mut __tmp = BytesMut::new(bytes);
9872        #[allow(clippy::absurd_extreme_comparisons)]
9873        #[allow(unused_comparisons)]
9874        if __tmp.remaining() < Self::ENCODED_LEN {
9875            panic!(
9876                "buffer is too small (need {} bytes, but got {})",
9877                Self::ENCODED_LEN,
9878                __tmp.remaining(),
9879            )
9880        }
9881        __tmp.put_u8(self.target_system);
9882        __tmp.put_u8(self.target_component);
9883        for val in &self.id_or_mac {
9884            __tmp.put_u8(*val);
9885        }
9886        __tmp.put_u8(self.operator_id_type as u8);
9887        for val in &self.operator_id {
9888            __tmp.put_u8(*val);
9889        }
9890        if matches!(version, MavlinkVersion::V2) {
9891            let len = __tmp.len();
9892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9893        } else {
9894            __tmp.len()
9895        }
9896    }
9897}
9898#[doc = "id: 248"]
9899#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
9900#[derive(Debug, Clone, PartialEq)]
9901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9903pub struct V2_EXTENSION_DATA {
9904    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
9905    pub message_type: u16,
9906    #[doc = "Network ID (0 for broadcast)"]
9907    pub target_network: u8,
9908    #[doc = "System ID (0 for broadcast)"]
9909    pub target_system: u8,
9910    #[doc = "Component ID (0 for broadcast)"]
9911    pub target_component: u8,
9912    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
9913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9914    pub payload: [u8; 249],
9915}
9916impl V2_EXTENSION_DATA {
9917    pub const ENCODED_LEN: usize = 254usize;
9918    pub const DEFAULT: Self = Self {
9919        message_type: 0_u16,
9920        target_network: 0_u8,
9921        target_system: 0_u8,
9922        target_component: 0_u8,
9923        payload: [0_u8; 249usize],
9924    };
9925    #[cfg(feature = "arbitrary")]
9926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9927        use arbitrary::{Arbitrary, Unstructured};
9928        let mut buf = [0u8; 1024];
9929        rng.fill_bytes(&mut buf);
9930        let mut unstructured = Unstructured::new(&buf);
9931        Self::arbitrary(&mut unstructured).unwrap_or_default()
9932    }
9933}
9934impl Default for V2_EXTENSION_DATA {
9935    fn default() -> Self {
9936        Self::DEFAULT.clone()
9937    }
9938}
9939impl MessageData for V2_EXTENSION_DATA {
9940    type Message = MavMessage;
9941    const ID: u32 = 248u32;
9942    const NAME: &'static str = "V2_EXTENSION";
9943    const EXTRA_CRC: u8 = 8u8;
9944    const ENCODED_LEN: usize = 254usize;
9945    fn deser(
9946        _version: MavlinkVersion,
9947        __input: &[u8],
9948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9949        let avail_len = __input.len();
9950        let mut payload_buf = [0; Self::ENCODED_LEN];
9951        let mut buf = if avail_len < Self::ENCODED_LEN {
9952            payload_buf[0..avail_len].copy_from_slice(__input);
9953            Bytes::new(&payload_buf)
9954        } else {
9955            Bytes::new(__input)
9956        };
9957        let mut __struct = Self::default();
9958        __struct.message_type = buf.get_u16_le();
9959        __struct.target_network = buf.get_u8();
9960        __struct.target_system = buf.get_u8();
9961        __struct.target_component = buf.get_u8();
9962        for v in &mut __struct.payload {
9963            let val = buf.get_u8();
9964            *v = val;
9965        }
9966        Ok(__struct)
9967    }
9968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9969        let mut __tmp = BytesMut::new(bytes);
9970        #[allow(clippy::absurd_extreme_comparisons)]
9971        #[allow(unused_comparisons)]
9972        if __tmp.remaining() < Self::ENCODED_LEN {
9973            panic!(
9974                "buffer is too small (need {} bytes, but got {})",
9975                Self::ENCODED_LEN,
9976                __tmp.remaining(),
9977            )
9978        }
9979        __tmp.put_u16_le(self.message_type);
9980        __tmp.put_u8(self.target_network);
9981        __tmp.put_u8(self.target_system);
9982        __tmp.put_u8(self.target_component);
9983        for val in &self.payload {
9984            __tmp.put_u8(*val);
9985        }
9986        if matches!(version, MavlinkVersion::V2) {
9987            let len = __tmp.len();
9988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9989        } else {
9990            __tmp.len()
9991        }
9992    }
9993}
9994#[doc = "id: 92"]
9995#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
9996#[derive(Debug, Clone, PartialEq)]
9997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9999pub struct HIL_RC_INPUTS_RAW_DATA {
10000    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10001    pub time_usec: u64,
10002    #[doc = "RC channel 1 value"]
10003    pub chan1_raw: u16,
10004    #[doc = "RC channel 2 value"]
10005    pub chan2_raw: u16,
10006    #[doc = "RC channel 3 value"]
10007    pub chan3_raw: u16,
10008    #[doc = "RC channel 4 value"]
10009    pub chan4_raw: u16,
10010    #[doc = "RC channel 5 value"]
10011    pub chan5_raw: u16,
10012    #[doc = "RC channel 6 value"]
10013    pub chan6_raw: u16,
10014    #[doc = "RC channel 7 value"]
10015    pub chan7_raw: u16,
10016    #[doc = "RC channel 8 value"]
10017    pub chan8_raw: u16,
10018    #[doc = "RC channel 9 value"]
10019    pub chan9_raw: u16,
10020    #[doc = "RC channel 10 value"]
10021    pub chan10_raw: u16,
10022    #[doc = "RC channel 11 value"]
10023    pub chan11_raw: u16,
10024    #[doc = "RC channel 12 value"]
10025    pub chan12_raw: u16,
10026    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
10027    pub rssi: u8,
10028}
10029impl HIL_RC_INPUTS_RAW_DATA {
10030    pub const ENCODED_LEN: usize = 33usize;
10031    pub const DEFAULT: Self = Self {
10032        time_usec: 0_u64,
10033        chan1_raw: 0_u16,
10034        chan2_raw: 0_u16,
10035        chan3_raw: 0_u16,
10036        chan4_raw: 0_u16,
10037        chan5_raw: 0_u16,
10038        chan6_raw: 0_u16,
10039        chan7_raw: 0_u16,
10040        chan8_raw: 0_u16,
10041        chan9_raw: 0_u16,
10042        chan10_raw: 0_u16,
10043        chan11_raw: 0_u16,
10044        chan12_raw: 0_u16,
10045        rssi: 0_u8,
10046    };
10047    #[cfg(feature = "arbitrary")]
10048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10049        use arbitrary::{Arbitrary, Unstructured};
10050        let mut buf = [0u8; 1024];
10051        rng.fill_bytes(&mut buf);
10052        let mut unstructured = Unstructured::new(&buf);
10053        Self::arbitrary(&mut unstructured).unwrap_or_default()
10054    }
10055}
10056impl Default for HIL_RC_INPUTS_RAW_DATA {
10057    fn default() -> Self {
10058        Self::DEFAULT.clone()
10059    }
10060}
10061impl MessageData for HIL_RC_INPUTS_RAW_DATA {
10062    type Message = MavMessage;
10063    const ID: u32 = 92u32;
10064    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
10065    const EXTRA_CRC: u8 = 54u8;
10066    const ENCODED_LEN: usize = 33usize;
10067    fn deser(
10068        _version: MavlinkVersion,
10069        __input: &[u8],
10070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10071        let avail_len = __input.len();
10072        let mut payload_buf = [0; Self::ENCODED_LEN];
10073        let mut buf = if avail_len < Self::ENCODED_LEN {
10074            payload_buf[0..avail_len].copy_from_slice(__input);
10075            Bytes::new(&payload_buf)
10076        } else {
10077            Bytes::new(__input)
10078        };
10079        let mut __struct = Self::default();
10080        __struct.time_usec = buf.get_u64_le();
10081        __struct.chan1_raw = buf.get_u16_le();
10082        __struct.chan2_raw = buf.get_u16_le();
10083        __struct.chan3_raw = buf.get_u16_le();
10084        __struct.chan4_raw = buf.get_u16_le();
10085        __struct.chan5_raw = buf.get_u16_le();
10086        __struct.chan6_raw = buf.get_u16_le();
10087        __struct.chan7_raw = buf.get_u16_le();
10088        __struct.chan8_raw = buf.get_u16_le();
10089        __struct.chan9_raw = buf.get_u16_le();
10090        __struct.chan10_raw = buf.get_u16_le();
10091        __struct.chan11_raw = buf.get_u16_le();
10092        __struct.chan12_raw = buf.get_u16_le();
10093        __struct.rssi = buf.get_u8();
10094        Ok(__struct)
10095    }
10096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10097        let mut __tmp = BytesMut::new(bytes);
10098        #[allow(clippy::absurd_extreme_comparisons)]
10099        #[allow(unused_comparisons)]
10100        if __tmp.remaining() < Self::ENCODED_LEN {
10101            panic!(
10102                "buffer is too small (need {} bytes, but got {})",
10103                Self::ENCODED_LEN,
10104                __tmp.remaining(),
10105            )
10106        }
10107        __tmp.put_u64_le(self.time_usec);
10108        __tmp.put_u16_le(self.chan1_raw);
10109        __tmp.put_u16_le(self.chan2_raw);
10110        __tmp.put_u16_le(self.chan3_raw);
10111        __tmp.put_u16_le(self.chan4_raw);
10112        __tmp.put_u16_le(self.chan5_raw);
10113        __tmp.put_u16_le(self.chan6_raw);
10114        __tmp.put_u16_le(self.chan7_raw);
10115        __tmp.put_u16_le(self.chan8_raw);
10116        __tmp.put_u16_le(self.chan9_raw);
10117        __tmp.put_u16_le(self.chan10_raw);
10118        __tmp.put_u16_le(self.chan11_raw);
10119        __tmp.put_u16_le(self.chan12_raw);
10120        __tmp.put_u8(self.rssi);
10121        if matches!(version, MavlinkVersion::V2) {
10122            let len = __tmp.len();
10123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10124        } else {
10125            __tmp.len()
10126        }
10127    }
10128}
10129#[doc = "id: 138"]
10130#[doc = "Motion capture attitude and position."]
10131#[derive(Debug, Clone, PartialEq)]
10132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10134pub struct ATT_POS_MOCAP_DATA {
10135    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10136    pub time_usec: u64,
10137    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
10138    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10139    pub q: [f32; 4],
10140    #[doc = "X position (NED)"]
10141    pub x: f32,
10142    #[doc = "Y position (NED)"]
10143    pub y: f32,
10144    #[doc = "Z position (NED)"]
10145    pub z: f32,
10146    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
10147    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10149    pub covariance: [f32; 21],
10150}
10151impl ATT_POS_MOCAP_DATA {
10152    pub const ENCODED_LEN: usize = 120usize;
10153    pub const DEFAULT: Self = Self {
10154        time_usec: 0_u64,
10155        q: [0.0_f32; 4usize],
10156        x: 0.0_f32,
10157        y: 0.0_f32,
10158        z: 0.0_f32,
10159        covariance: [0.0_f32; 21usize],
10160    };
10161    #[cfg(feature = "arbitrary")]
10162    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10163        use arbitrary::{Arbitrary, Unstructured};
10164        let mut buf = [0u8; 1024];
10165        rng.fill_bytes(&mut buf);
10166        let mut unstructured = Unstructured::new(&buf);
10167        Self::arbitrary(&mut unstructured).unwrap_or_default()
10168    }
10169}
10170impl Default for ATT_POS_MOCAP_DATA {
10171    fn default() -> Self {
10172        Self::DEFAULT.clone()
10173    }
10174}
10175impl MessageData for ATT_POS_MOCAP_DATA {
10176    type Message = MavMessage;
10177    const ID: u32 = 138u32;
10178    const NAME: &'static str = "ATT_POS_MOCAP";
10179    const EXTRA_CRC: u8 = 109u8;
10180    const ENCODED_LEN: usize = 120usize;
10181    fn deser(
10182        _version: MavlinkVersion,
10183        __input: &[u8],
10184    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10185        let avail_len = __input.len();
10186        let mut payload_buf = [0; Self::ENCODED_LEN];
10187        let mut buf = if avail_len < Self::ENCODED_LEN {
10188            payload_buf[0..avail_len].copy_from_slice(__input);
10189            Bytes::new(&payload_buf)
10190        } else {
10191            Bytes::new(__input)
10192        };
10193        let mut __struct = Self::default();
10194        __struct.time_usec = buf.get_u64_le();
10195        for v in &mut __struct.q {
10196            let val = buf.get_f32_le();
10197            *v = val;
10198        }
10199        __struct.x = buf.get_f32_le();
10200        __struct.y = buf.get_f32_le();
10201        __struct.z = buf.get_f32_le();
10202        for v in &mut __struct.covariance {
10203            let val = buf.get_f32_le();
10204            *v = val;
10205        }
10206        Ok(__struct)
10207    }
10208    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10209        let mut __tmp = BytesMut::new(bytes);
10210        #[allow(clippy::absurd_extreme_comparisons)]
10211        #[allow(unused_comparisons)]
10212        if __tmp.remaining() < Self::ENCODED_LEN {
10213            panic!(
10214                "buffer is too small (need {} bytes, but got {})",
10215                Self::ENCODED_LEN,
10216                __tmp.remaining(),
10217            )
10218        }
10219        __tmp.put_u64_le(self.time_usec);
10220        for val in &self.q {
10221            __tmp.put_f32_le(*val);
10222        }
10223        __tmp.put_f32_le(self.x);
10224        __tmp.put_f32_le(self.y);
10225        __tmp.put_f32_le(self.z);
10226        for val in &self.covariance {
10227            __tmp.put_f32_le(*val);
10228        }
10229        if matches!(version, MavlinkVersion::V2) {
10230            let len = __tmp.len();
10231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10232        } else {
10233            __tmp.len()
10234        }
10235    }
10236}
10237#[doc = "id: 265"]
10238#[doc = "Orientation of a mount."]
10239#[derive(Debug, Clone, PartialEq)]
10240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10242pub struct MOUNT_ORIENTATION_DATA {
10243    #[doc = "Timestamp (time since system boot)."]
10244    pub time_boot_ms: u32,
10245    #[doc = "Roll in global frame (set to NaN for invalid)."]
10246    pub roll: f32,
10247    #[doc = "Pitch in global frame (set to NaN for invalid)."]
10248    pub pitch: f32,
10249    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
10250    pub yaw: f32,
10251    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
10252    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10253    pub yaw_absolute: f32,
10254}
10255impl MOUNT_ORIENTATION_DATA {
10256    pub const ENCODED_LEN: usize = 20usize;
10257    pub const DEFAULT: Self = Self {
10258        time_boot_ms: 0_u32,
10259        roll: 0.0_f32,
10260        pitch: 0.0_f32,
10261        yaw: 0.0_f32,
10262        yaw_absolute: 0.0_f32,
10263    };
10264    #[cfg(feature = "arbitrary")]
10265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10266        use arbitrary::{Arbitrary, Unstructured};
10267        let mut buf = [0u8; 1024];
10268        rng.fill_bytes(&mut buf);
10269        let mut unstructured = Unstructured::new(&buf);
10270        Self::arbitrary(&mut unstructured).unwrap_or_default()
10271    }
10272}
10273impl Default for MOUNT_ORIENTATION_DATA {
10274    fn default() -> Self {
10275        Self::DEFAULT.clone()
10276    }
10277}
10278impl MessageData for MOUNT_ORIENTATION_DATA {
10279    type Message = MavMessage;
10280    const ID: u32 = 265u32;
10281    const NAME: &'static str = "MOUNT_ORIENTATION";
10282    const EXTRA_CRC: u8 = 26u8;
10283    const ENCODED_LEN: usize = 20usize;
10284    fn deser(
10285        _version: MavlinkVersion,
10286        __input: &[u8],
10287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10288        let avail_len = __input.len();
10289        let mut payload_buf = [0; Self::ENCODED_LEN];
10290        let mut buf = if avail_len < Self::ENCODED_LEN {
10291            payload_buf[0..avail_len].copy_from_slice(__input);
10292            Bytes::new(&payload_buf)
10293        } else {
10294            Bytes::new(__input)
10295        };
10296        let mut __struct = Self::default();
10297        __struct.time_boot_ms = buf.get_u32_le();
10298        __struct.roll = buf.get_f32_le();
10299        __struct.pitch = buf.get_f32_le();
10300        __struct.yaw = buf.get_f32_le();
10301        __struct.yaw_absolute = buf.get_f32_le();
10302        Ok(__struct)
10303    }
10304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10305        let mut __tmp = BytesMut::new(bytes);
10306        #[allow(clippy::absurd_extreme_comparisons)]
10307        #[allow(unused_comparisons)]
10308        if __tmp.remaining() < Self::ENCODED_LEN {
10309            panic!(
10310                "buffer is too small (need {} bytes, but got {})",
10311                Self::ENCODED_LEN,
10312                __tmp.remaining(),
10313            )
10314        }
10315        __tmp.put_u32_le(self.time_boot_ms);
10316        __tmp.put_f32_le(self.roll);
10317        __tmp.put_f32_le(self.pitch);
10318        __tmp.put_f32_le(self.yaw);
10319        __tmp.put_f32_le(self.yaw_absolute);
10320        if matches!(version, MavlinkVersion::V2) {
10321            let len = __tmp.len();
10322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10323        } else {
10324            __tmp.len()
10325        }
10326    }
10327}
10328#[doc = "id: 8"]
10329#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
10330#[derive(Debug, Clone, PartialEq)]
10331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10333pub struct LINK_NODE_STATUS_DATA {
10334    #[doc = "Timestamp (time since system boot)."]
10335    pub timestamp: u64,
10336    #[doc = "Transmit rate"]
10337    pub tx_rate: u32,
10338    #[doc = "Receive rate"]
10339    pub rx_rate: u32,
10340    #[doc = "Messages sent"]
10341    pub messages_sent: u32,
10342    #[doc = "Messages received (estimated from counting seq)"]
10343    pub messages_received: u32,
10344    #[doc = "Messages lost (estimated from counting seq)"]
10345    pub messages_lost: u32,
10346    #[doc = "Number of bytes that could not be parsed correctly."]
10347    pub rx_parse_err: u16,
10348    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
10349    pub tx_overflows: u16,
10350    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
10351    pub rx_overflows: u16,
10352    #[doc = "Remaining free transmit buffer space"]
10353    pub tx_buf: u8,
10354    #[doc = "Remaining free receive buffer space"]
10355    pub rx_buf: u8,
10356}
10357impl LINK_NODE_STATUS_DATA {
10358    pub const ENCODED_LEN: usize = 36usize;
10359    pub const DEFAULT: Self = Self {
10360        timestamp: 0_u64,
10361        tx_rate: 0_u32,
10362        rx_rate: 0_u32,
10363        messages_sent: 0_u32,
10364        messages_received: 0_u32,
10365        messages_lost: 0_u32,
10366        rx_parse_err: 0_u16,
10367        tx_overflows: 0_u16,
10368        rx_overflows: 0_u16,
10369        tx_buf: 0_u8,
10370        rx_buf: 0_u8,
10371    };
10372    #[cfg(feature = "arbitrary")]
10373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10374        use arbitrary::{Arbitrary, Unstructured};
10375        let mut buf = [0u8; 1024];
10376        rng.fill_bytes(&mut buf);
10377        let mut unstructured = Unstructured::new(&buf);
10378        Self::arbitrary(&mut unstructured).unwrap_or_default()
10379    }
10380}
10381impl Default for LINK_NODE_STATUS_DATA {
10382    fn default() -> Self {
10383        Self::DEFAULT.clone()
10384    }
10385}
10386impl MessageData for LINK_NODE_STATUS_DATA {
10387    type Message = MavMessage;
10388    const ID: u32 = 8u32;
10389    const NAME: &'static str = "LINK_NODE_STATUS";
10390    const EXTRA_CRC: u8 = 117u8;
10391    const ENCODED_LEN: usize = 36usize;
10392    fn deser(
10393        _version: MavlinkVersion,
10394        __input: &[u8],
10395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10396        let avail_len = __input.len();
10397        let mut payload_buf = [0; Self::ENCODED_LEN];
10398        let mut buf = if avail_len < Self::ENCODED_LEN {
10399            payload_buf[0..avail_len].copy_from_slice(__input);
10400            Bytes::new(&payload_buf)
10401        } else {
10402            Bytes::new(__input)
10403        };
10404        let mut __struct = Self::default();
10405        __struct.timestamp = buf.get_u64_le();
10406        __struct.tx_rate = buf.get_u32_le();
10407        __struct.rx_rate = buf.get_u32_le();
10408        __struct.messages_sent = buf.get_u32_le();
10409        __struct.messages_received = buf.get_u32_le();
10410        __struct.messages_lost = buf.get_u32_le();
10411        __struct.rx_parse_err = buf.get_u16_le();
10412        __struct.tx_overflows = buf.get_u16_le();
10413        __struct.rx_overflows = buf.get_u16_le();
10414        __struct.tx_buf = buf.get_u8();
10415        __struct.rx_buf = buf.get_u8();
10416        Ok(__struct)
10417    }
10418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10419        let mut __tmp = BytesMut::new(bytes);
10420        #[allow(clippy::absurd_extreme_comparisons)]
10421        #[allow(unused_comparisons)]
10422        if __tmp.remaining() < Self::ENCODED_LEN {
10423            panic!(
10424                "buffer is too small (need {} bytes, but got {})",
10425                Self::ENCODED_LEN,
10426                __tmp.remaining(),
10427            )
10428        }
10429        __tmp.put_u64_le(self.timestamp);
10430        __tmp.put_u32_le(self.tx_rate);
10431        __tmp.put_u32_le(self.rx_rate);
10432        __tmp.put_u32_le(self.messages_sent);
10433        __tmp.put_u32_le(self.messages_received);
10434        __tmp.put_u32_le(self.messages_lost);
10435        __tmp.put_u16_le(self.rx_parse_err);
10436        __tmp.put_u16_le(self.tx_overflows);
10437        __tmp.put_u16_le(self.rx_overflows);
10438        __tmp.put_u8(self.tx_buf);
10439        __tmp.put_u8(self.rx_buf);
10440        if matches!(version, MavlinkVersion::V2) {
10441            let len = __tmp.len();
10442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10443        } else {
10444            __tmp.len()
10445        }
10446    }
10447}
10448#[doc = "id: 131"]
10449#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10450#[derive(Debug, Clone, PartialEq)]
10451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10453pub struct ENCAPSULATED_DATA_DATA {
10454    #[doc = "sequence number (starting with 0 on every transmission)"]
10455    pub seqnr: u16,
10456    #[doc = "image data bytes"]
10457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10458    pub data: [u8; 253],
10459}
10460impl ENCAPSULATED_DATA_DATA {
10461    pub const ENCODED_LEN: usize = 255usize;
10462    pub const DEFAULT: Self = Self {
10463        seqnr: 0_u16,
10464        data: [0_u8; 253usize],
10465    };
10466    #[cfg(feature = "arbitrary")]
10467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10468        use arbitrary::{Arbitrary, Unstructured};
10469        let mut buf = [0u8; 1024];
10470        rng.fill_bytes(&mut buf);
10471        let mut unstructured = Unstructured::new(&buf);
10472        Self::arbitrary(&mut unstructured).unwrap_or_default()
10473    }
10474}
10475impl Default for ENCAPSULATED_DATA_DATA {
10476    fn default() -> Self {
10477        Self::DEFAULT.clone()
10478    }
10479}
10480impl MessageData for ENCAPSULATED_DATA_DATA {
10481    type Message = MavMessage;
10482    const ID: u32 = 131u32;
10483    const NAME: &'static str = "ENCAPSULATED_DATA";
10484    const EXTRA_CRC: u8 = 223u8;
10485    const ENCODED_LEN: usize = 255usize;
10486    fn deser(
10487        _version: MavlinkVersion,
10488        __input: &[u8],
10489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10490        let avail_len = __input.len();
10491        let mut payload_buf = [0; Self::ENCODED_LEN];
10492        let mut buf = if avail_len < Self::ENCODED_LEN {
10493            payload_buf[0..avail_len].copy_from_slice(__input);
10494            Bytes::new(&payload_buf)
10495        } else {
10496            Bytes::new(__input)
10497        };
10498        let mut __struct = Self::default();
10499        __struct.seqnr = buf.get_u16_le();
10500        for v in &mut __struct.data {
10501            let val = buf.get_u8();
10502            *v = val;
10503        }
10504        Ok(__struct)
10505    }
10506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10507        let mut __tmp = BytesMut::new(bytes);
10508        #[allow(clippy::absurd_extreme_comparisons)]
10509        #[allow(unused_comparisons)]
10510        if __tmp.remaining() < Self::ENCODED_LEN {
10511            panic!(
10512                "buffer is too small (need {} bytes, but got {})",
10513                Self::ENCODED_LEN,
10514                __tmp.remaining(),
10515            )
10516        }
10517        __tmp.put_u16_le(self.seqnr);
10518        for val in &self.data {
10519            __tmp.put_u8(*val);
10520        }
10521        if matches!(version, MavlinkVersion::V2) {
10522            let len = __tmp.len();
10523            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10524        } else {
10525            __tmp.len()
10526        }
10527    }
10528}
10529#[doc = "id: 387"]
10530#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
10531#[derive(Debug, Clone, PartialEq)]
10532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10534pub struct CANFD_FRAME_DATA {
10535    #[doc = "Frame ID"]
10536    pub id: u32,
10537    #[doc = "System ID."]
10538    pub target_system: u8,
10539    #[doc = "Component ID."]
10540    pub target_component: u8,
10541    #[doc = "bus number"]
10542    pub bus: u8,
10543    #[doc = "Frame length"]
10544    pub len: u8,
10545    #[doc = "Frame data"]
10546    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10547    pub data: [u8; 64],
10548}
10549impl CANFD_FRAME_DATA {
10550    pub const ENCODED_LEN: usize = 72usize;
10551    pub const DEFAULT: Self = Self {
10552        id: 0_u32,
10553        target_system: 0_u8,
10554        target_component: 0_u8,
10555        bus: 0_u8,
10556        len: 0_u8,
10557        data: [0_u8; 64usize],
10558    };
10559    #[cfg(feature = "arbitrary")]
10560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10561        use arbitrary::{Arbitrary, Unstructured};
10562        let mut buf = [0u8; 1024];
10563        rng.fill_bytes(&mut buf);
10564        let mut unstructured = Unstructured::new(&buf);
10565        Self::arbitrary(&mut unstructured).unwrap_or_default()
10566    }
10567}
10568impl Default for CANFD_FRAME_DATA {
10569    fn default() -> Self {
10570        Self::DEFAULT.clone()
10571    }
10572}
10573impl MessageData for CANFD_FRAME_DATA {
10574    type Message = MavMessage;
10575    const ID: u32 = 387u32;
10576    const NAME: &'static str = "CANFD_FRAME";
10577    const EXTRA_CRC: u8 = 4u8;
10578    const ENCODED_LEN: usize = 72usize;
10579    fn deser(
10580        _version: MavlinkVersion,
10581        __input: &[u8],
10582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10583        let avail_len = __input.len();
10584        let mut payload_buf = [0; Self::ENCODED_LEN];
10585        let mut buf = if avail_len < Self::ENCODED_LEN {
10586            payload_buf[0..avail_len].copy_from_slice(__input);
10587            Bytes::new(&payload_buf)
10588        } else {
10589            Bytes::new(__input)
10590        };
10591        let mut __struct = Self::default();
10592        __struct.id = buf.get_u32_le();
10593        __struct.target_system = buf.get_u8();
10594        __struct.target_component = buf.get_u8();
10595        __struct.bus = buf.get_u8();
10596        __struct.len = buf.get_u8();
10597        for v in &mut __struct.data {
10598            let val = buf.get_u8();
10599            *v = val;
10600        }
10601        Ok(__struct)
10602    }
10603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10604        let mut __tmp = BytesMut::new(bytes);
10605        #[allow(clippy::absurd_extreme_comparisons)]
10606        #[allow(unused_comparisons)]
10607        if __tmp.remaining() < Self::ENCODED_LEN {
10608            panic!(
10609                "buffer is too small (need {} bytes, but got {})",
10610                Self::ENCODED_LEN,
10611                __tmp.remaining(),
10612            )
10613        }
10614        __tmp.put_u32_le(self.id);
10615        __tmp.put_u8(self.target_system);
10616        __tmp.put_u8(self.target_component);
10617        __tmp.put_u8(self.bus);
10618        __tmp.put_u8(self.len);
10619        for val in &self.data {
10620            __tmp.put_u8(*val);
10621        }
10622        if matches!(version, MavlinkVersion::V2) {
10623            let len = __tmp.len();
10624            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10625        } else {
10626            __tmp.len()
10627        }
10628    }
10629}
10630#[doc = "id: 12901"]
10631#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
10632#[derive(Debug, Clone, PartialEq)]
10633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10635pub struct OPEN_DRONE_ID_LOCATION_DATA {
10636    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
10637    pub latitude: i32,
10638    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
10639    pub longitude: i32,
10640    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
10641    pub altitude_barometric: f32,
10642    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
10643    pub altitude_geodetic: f32,
10644    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
10645    pub height: f32,
10646    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
10647    pub timestamp: f32,
10648    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
10649    pub direction: u16,
10650    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
10651    pub speed_horizontal: u16,
10652    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
10653    pub speed_vertical: i16,
10654    #[doc = "System ID (0 for broadcast)."]
10655    pub target_system: u8,
10656    #[doc = "Component ID (0 for broadcast)."]
10657    pub target_component: u8,
10658    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
10659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10660    pub id_or_mac: [u8; 20],
10661    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
10662    pub status: MavOdidStatus,
10663    #[doc = "Indicates the reference point for the height field."]
10664    pub height_reference: MavOdidHeightRef,
10665    #[doc = "The accuracy of the horizontal position."]
10666    pub horizontal_accuracy: MavOdidHorAcc,
10667    #[doc = "The accuracy of the vertical position."]
10668    pub vertical_accuracy: MavOdidVerAcc,
10669    #[doc = "The accuracy of the barometric altitude."]
10670    pub barometer_accuracy: MavOdidVerAcc,
10671    #[doc = "The accuracy of the horizontal and vertical speed."]
10672    pub speed_accuracy: MavOdidSpeedAcc,
10673    #[doc = "The accuracy of the timestamps."]
10674    pub timestamp_accuracy: MavOdidTimeAcc,
10675}
10676impl OPEN_DRONE_ID_LOCATION_DATA {
10677    pub const ENCODED_LEN: usize = 59usize;
10678    pub const DEFAULT: Self = Self {
10679        latitude: 0_i32,
10680        longitude: 0_i32,
10681        altitude_barometric: 0.0_f32,
10682        altitude_geodetic: 0.0_f32,
10683        height: 0.0_f32,
10684        timestamp: 0.0_f32,
10685        direction: 0_u16,
10686        speed_horizontal: 0_u16,
10687        speed_vertical: 0_i16,
10688        target_system: 0_u8,
10689        target_component: 0_u8,
10690        id_or_mac: [0_u8; 20usize],
10691        status: MavOdidStatus::DEFAULT,
10692        height_reference: MavOdidHeightRef::DEFAULT,
10693        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
10694        vertical_accuracy: MavOdidVerAcc::DEFAULT,
10695        barometer_accuracy: MavOdidVerAcc::DEFAULT,
10696        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
10697        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
10698    };
10699    #[cfg(feature = "arbitrary")]
10700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10701        use arbitrary::{Arbitrary, Unstructured};
10702        let mut buf = [0u8; 1024];
10703        rng.fill_bytes(&mut buf);
10704        let mut unstructured = Unstructured::new(&buf);
10705        Self::arbitrary(&mut unstructured).unwrap_or_default()
10706    }
10707}
10708impl Default for OPEN_DRONE_ID_LOCATION_DATA {
10709    fn default() -> Self {
10710        Self::DEFAULT.clone()
10711    }
10712}
10713impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
10714    type Message = MavMessage;
10715    const ID: u32 = 12901u32;
10716    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
10717    const EXTRA_CRC: u8 = 254u8;
10718    const ENCODED_LEN: usize = 59usize;
10719    fn deser(
10720        _version: MavlinkVersion,
10721        __input: &[u8],
10722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10723        let avail_len = __input.len();
10724        let mut payload_buf = [0; Self::ENCODED_LEN];
10725        let mut buf = if avail_len < Self::ENCODED_LEN {
10726            payload_buf[0..avail_len].copy_from_slice(__input);
10727            Bytes::new(&payload_buf)
10728        } else {
10729            Bytes::new(__input)
10730        };
10731        let mut __struct = Self::default();
10732        __struct.latitude = buf.get_i32_le();
10733        __struct.longitude = buf.get_i32_le();
10734        __struct.altitude_barometric = buf.get_f32_le();
10735        __struct.altitude_geodetic = buf.get_f32_le();
10736        __struct.height = buf.get_f32_le();
10737        __struct.timestamp = buf.get_f32_le();
10738        __struct.direction = buf.get_u16_le();
10739        __struct.speed_horizontal = buf.get_u16_le();
10740        __struct.speed_vertical = buf.get_i16_le();
10741        __struct.target_system = buf.get_u8();
10742        __struct.target_component = buf.get_u8();
10743        for v in &mut __struct.id_or_mac {
10744            let val = buf.get_u8();
10745            *v = val;
10746        }
10747        let tmp = buf.get_u8();
10748        __struct.status =
10749            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10750                enum_type: "MavOdidStatus",
10751                value: tmp as u32,
10752            })?;
10753        let tmp = buf.get_u8();
10754        __struct.height_reference =
10755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10756                enum_type: "MavOdidHeightRef",
10757                value: tmp as u32,
10758            })?;
10759        let tmp = buf.get_u8();
10760        __struct.horizontal_accuracy =
10761            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10762                enum_type: "MavOdidHorAcc",
10763                value: tmp as u32,
10764            })?;
10765        let tmp = buf.get_u8();
10766        __struct.vertical_accuracy =
10767            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10768                enum_type: "MavOdidVerAcc",
10769                value: tmp as u32,
10770            })?;
10771        let tmp = buf.get_u8();
10772        __struct.barometer_accuracy =
10773            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10774                enum_type: "MavOdidVerAcc",
10775                value: tmp as u32,
10776            })?;
10777        let tmp = buf.get_u8();
10778        __struct.speed_accuracy =
10779            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10780                enum_type: "MavOdidSpeedAcc",
10781                value: tmp as u32,
10782            })?;
10783        let tmp = buf.get_u8();
10784        __struct.timestamp_accuracy =
10785            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10786                enum_type: "MavOdidTimeAcc",
10787                value: tmp as u32,
10788            })?;
10789        Ok(__struct)
10790    }
10791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10792        let mut __tmp = BytesMut::new(bytes);
10793        #[allow(clippy::absurd_extreme_comparisons)]
10794        #[allow(unused_comparisons)]
10795        if __tmp.remaining() < Self::ENCODED_LEN {
10796            panic!(
10797                "buffer is too small (need {} bytes, but got {})",
10798                Self::ENCODED_LEN,
10799                __tmp.remaining(),
10800            )
10801        }
10802        __tmp.put_i32_le(self.latitude);
10803        __tmp.put_i32_le(self.longitude);
10804        __tmp.put_f32_le(self.altitude_barometric);
10805        __tmp.put_f32_le(self.altitude_geodetic);
10806        __tmp.put_f32_le(self.height);
10807        __tmp.put_f32_le(self.timestamp);
10808        __tmp.put_u16_le(self.direction);
10809        __tmp.put_u16_le(self.speed_horizontal);
10810        __tmp.put_i16_le(self.speed_vertical);
10811        __tmp.put_u8(self.target_system);
10812        __tmp.put_u8(self.target_component);
10813        for val in &self.id_or_mac {
10814            __tmp.put_u8(*val);
10815        }
10816        __tmp.put_u8(self.status as u8);
10817        __tmp.put_u8(self.height_reference as u8);
10818        __tmp.put_u8(self.horizontal_accuracy as u8);
10819        __tmp.put_u8(self.vertical_accuracy as u8);
10820        __tmp.put_u8(self.barometer_accuracy as u8);
10821        __tmp.put_u8(self.speed_accuracy as u8);
10822        __tmp.put_u8(self.timestamp_accuracy as u8);
10823        if matches!(version, MavlinkVersion::V2) {
10824            let len = __tmp.len();
10825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10826        } else {
10827            __tmp.len()
10828        }
10829    }
10830}
10831#[doc = "id: 270"]
10832#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
10833#[derive(Debug, Clone, PartialEq)]
10834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10836pub struct VIDEO_STREAM_STATUS_DATA {
10837    #[doc = "Frame rate"]
10838    pub framerate: f32,
10839    #[doc = "Bit rate"]
10840    pub bitrate: u32,
10841    #[doc = "Bitmap of stream status flags"]
10842    pub flags: VideoStreamStatusFlags,
10843    #[doc = "Horizontal resolution"]
10844    pub resolution_h: u16,
10845    #[doc = "Vertical resolution"]
10846    pub resolution_v: u16,
10847    #[doc = "Video image rotation clockwise"]
10848    pub rotation: u16,
10849    #[doc = "Horizontal Field of view"]
10850    pub hfov: u16,
10851    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
10852    pub stream_id: u8,
10853    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10854    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10855    pub camera_device_id: u8,
10856}
10857impl VIDEO_STREAM_STATUS_DATA {
10858    pub const ENCODED_LEN: usize = 20usize;
10859    pub const DEFAULT: Self = Self {
10860        framerate: 0.0_f32,
10861        bitrate: 0_u32,
10862        flags: VideoStreamStatusFlags::DEFAULT,
10863        resolution_h: 0_u16,
10864        resolution_v: 0_u16,
10865        rotation: 0_u16,
10866        hfov: 0_u16,
10867        stream_id: 0_u8,
10868        camera_device_id: 0_u8,
10869    };
10870    #[cfg(feature = "arbitrary")]
10871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10872        use arbitrary::{Arbitrary, Unstructured};
10873        let mut buf = [0u8; 1024];
10874        rng.fill_bytes(&mut buf);
10875        let mut unstructured = Unstructured::new(&buf);
10876        Self::arbitrary(&mut unstructured).unwrap_or_default()
10877    }
10878}
10879impl Default for VIDEO_STREAM_STATUS_DATA {
10880    fn default() -> Self {
10881        Self::DEFAULT.clone()
10882    }
10883}
10884impl MessageData for VIDEO_STREAM_STATUS_DATA {
10885    type Message = MavMessage;
10886    const ID: u32 = 270u32;
10887    const NAME: &'static str = "VIDEO_STREAM_STATUS";
10888    const EXTRA_CRC: u8 = 59u8;
10889    const ENCODED_LEN: usize = 20usize;
10890    fn deser(
10891        _version: MavlinkVersion,
10892        __input: &[u8],
10893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10894        let avail_len = __input.len();
10895        let mut payload_buf = [0; Self::ENCODED_LEN];
10896        let mut buf = if avail_len < Self::ENCODED_LEN {
10897            payload_buf[0..avail_len].copy_from_slice(__input);
10898            Bytes::new(&payload_buf)
10899        } else {
10900            Bytes::new(__input)
10901        };
10902        let mut __struct = Self::default();
10903        __struct.framerate = buf.get_f32_le();
10904        __struct.bitrate = buf.get_u32_le();
10905        let tmp = buf.get_u16_le();
10906        __struct.flags = VideoStreamStatusFlags::from_bits(
10907            tmp & VideoStreamStatusFlags::all().bits(),
10908        )
10909        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10910            flag_type: "VideoStreamStatusFlags",
10911            value: tmp as u32,
10912        })?;
10913        __struct.resolution_h = buf.get_u16_le();
10914        __struct.resolution_v = buf.get_u16_le();
10915        __struct.rotation = buf.get_u16_le();
10916        __struct.hfov = buf.get_u16_le();
10917        __struct.stream_id = buf.get_u8();
10918        __struct.camera_device_id = buf.get_u8();
10919        Ok(__struct)
10920    }
10921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10922        let mut __tmp = BytesMut::new(bytes);
10923        #[allow(clippy::absurd_extreme_comparisons)]
10924        #[allow(unused_comparisons)]
10925        if __tmp.remaining() < Self::ENCODED_LEN {
10926            panic!(
10927                "buffer is too small (need {} bytes, but got {})",
10928                Self::ENCODED_LEN,
10929                __tmp.remaining(),
10930            )
10931        }
10932        __tmp.put_f32_le(self.framerate);
10933        __tmp.put_u32_le(self.bitrate);
10934        __tmp.put_u16_le(self.flags.bits());
10935        __tmp.put_u16_le(self.resolution_h);
10936        __tmp.put_u16_le(self.resolution_v);
10937        __tmp.put_u16_le(self.rotation);
10938        __tmp.put_u16_le(self.hfov);
10939        __tmp.put_u8(self.stream_id);
10940        __tmp.put_u8(self.camera_device_id);
10941        if matches!(version, MavlinkVersion::V2) {
10942            let len = __tmp.len();
10943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10944        } else {
10945            __tmp.len()
10946        }
10947    }
10948}
10949#[doc = "id: 413"]
10950#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
10951#[derive(Debug, Clone, PartialEq)]
10952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10954pub struct RESPONSE_EVENT_ERROR_DATA {
10955    #[doc = "Sequence number."]
10956    pub sequence: u16,
10957    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
10958    pub sequence_oldest_available: u16,
10959    #[doc = "System ID"]
10960    pub target_system: u8,
10961    #[doc = "Component ID"]
10962    pub target_component: u8,
10963    #[doc = "Error reason."]
10964    pub reason: MavEventErrorReason,
10965}
10966impl RESPONSE_EVENT_ERROR_DATA {
10967    pub const ENCODED_LEN: usize = 7usize;
10968    pub const DEFAULT: Self = Self {
10969        sequence: 0_u16,
10970        sequence_oldest_available: 0_u16,
10971        target_system: 0_u8,
10972        target_component: 0_u8,
10973        reason: MavEventErrorReason::DEFAULT,
10974    };
10975    #[cfg(feature = "arbitrary")]
10976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10977        use arbitrary::{Arbitrary, Unstructured};
10978        let mut buf = [0u8; 1024];
10979        rng.fill_bytes(&mut buf);
10980        let mut unstructured = Unstructured::new(&buf);
10981        Self::arbitrary(&mut unstructured).unwrap_or_default()
10982    }
10983}
10984impl Default for RESPONSE_EVENT_ERROR_DATA {
10985    fn default() -> Self {
10986        Self::DEFAULT.clone()
10987    }
10988}
10989impl MessageData for RESPONSE_EVENT_ERROR_DATA {
10990    type Message = MavMessage;
10991    const ID: u32 = 413u32;
10992    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
10993    const EXTRA_CRC: u8 = 77u8;
10994    const ENCODED_LEN: usize = 7usize;
10995    fn deser(
10996        _version: MavlinkVersion,
10997        __input: &[u8],
10998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10999        let avail_len = __input.len();
11000        let mut payload_buf = [0; Self::ENCODED_LEN];
11001        let mut buf = if avail_len < Self::ENCODED_LEN {
11002            payload_buf[0..avail_len].copy_from_slice(__input);
11003            Bytes::new(&payload_buf)
11004        } else {
11005            Bytes::new(__input)
11006        };
11007        let mut __struct = Self::default();
11008        __struct.sequence = buf.get_u16_le();
11009        __struct.sequence_oldest_available = buf.get_u16_le();
11010        __struct.target_system = buf.get_u8();
11011        __struct.target_component = buf.get_u8();
11012        let tmp = buf.get_u8();
11013        __struct.reason =
11014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11015                enum_type: "MavEventErrorReason",
11016                value: tmp as u32,
11017            })?;
11018        Ok(__struct)
11019    }
11020    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11021        let mut __tmp = BytesMut::new(bytes);
11022        #[allow(clippy::absurd_extreme_comparisons)]
11023        #[allow(unused_comparisons)]
11024        if __tmp.remaining() < Self::ENCODED_LEN {
11025            panic!(
11026                "buffer is too small (need {} bytes, but got {})",
11027                Self::ENCODED_LEN,
11028                __tmp.remaining(),
11029            )
11030        }
11031        __tmp.put_u16_le(self.sequence);
11032        __tmp.put_u16_le(self.sequence_oldest_available);
11033        __tmp.put_u8(self.target_system);
11034        __tmp.put_u8(self.target_component);
11035        __tmp.put_u8(self.reason as u8);
11036        if matches!(version, MavlinkVersion::V2) {
11037            let len = __tmp.len();
11038            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11039        } else {
11040            __tmp.len()
11041        }
11042    }
11043}
11044#[doc = "id: 12920"]
11045#[doc = "Temperature and humidity from hygrometer."]
11046#[derive(Debug, Clone, PartialEq)]
11047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11049pub struct HYGROMETER_SENSOR_DATA {
11050    #[doc = "Temperature"]
11051    pub temperature: i16,
11052    #[doc = "Humidity"]
11053    pub humidity: u16,
11054    #[doc = "Hygrometer ID"]
11055    pub id: u8,
11056}
11057impl HYGROMETER_SENSOR_DATA {
11058    pub const ENCODED_LEN: usize = 5usize;
11059    pub const DEFAULT: Self = Self {
11060        temperature: 0_i16,
11061        humidity: 0_u16,
11062        id: 0_u8,
11063    };
11064    #[cfg(feature = "arbitrary")]
11065    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11066        use arbitrary::{Arbitrary, Unstructured};
11067        let mut buf = [0u8; 1024];
11068        rng.fill_bytes(&mut buf);
11069        let mut unstructured = Unstructured::new(&buf);
11070        Self::arbitrary(&mut unstructured).unwrap_or_default()
11071    }
11072}
11073impl Default for HYGROMETER_SENSOR_DATA {
11074    fn default() -> Self {
11075        Self::DEFAULT.clone()
11076    }
11077}
11078impl MessageData for HYGROMETER_SENSOR_DATA {
11079    type Message = MavMessage;
11080    const ID: u32 = 12920u32;
11081    const NAME: &'static str = "HYGROMETER_SENSOR";
11082    const EXTRA_CRC: u8 = 20u8;
11083    const ENCODED_LEN: usize = 5usize;
11084    fn deser(
11085        _version: MavlinkVersion,
11086        __input: &[u8],
11087    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11088        let avail_len = __input.len();
11089        let mut payload_buf = [0; Self::ENCODED_LEN];
11090        let mut buf = if avail_len < Self::ENCODED_LEN {
11091            payload_buf[0..avail_len].copy_from_slice(__input);
11092            Bytes::new(&payload_buf)
11093        } else {
11094            Bytes::new(__input)
11095        };
11096        let mut __struct = Self::default();
11097        __struct.temperature = buf.get_i16_le();
11098        __struct.humidity = buf.get_u16_le();
11099        __struct.id = buf.get_u8();
11100        Ok(__struct)
11101    }
11102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11103        let mut __tmp = BytesMut::new(bytes);
11104        #[allow(clippy::absurd_extreme_comparisons)]
11105        #[allow(unused_comparisons)]
11106        if __tmp.remaining() < Self::ENCODED_LEN {
11107            panic!(
11108                "buffer is too small (need {} bytes, but got {})",
11109                Self::ENCODED_LEN,
11110                __tmp.remaining(),
11111            )
11112        }
11113        __tmp.put_i16_le(self.temperature);
11114        __tmp.put_u16_le(self.humidity);
11115        __tmp.put_u8(self.id);
11116        if matches!(version, MavlinkVersion::V2) {
11117            let len = __tmp.len();
11118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11119        } else {
11120            __tmp.len()
11121        }
11122    }
11123}
11124#[doc = "id: 386"]
11125#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
11126#[derive(Debug, Clone, PartialEq)]
11127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11129pub struct CAN_FRAME_DATA {
11130    #[doc = "Frame ID"]
11131    pub id: u32,
11132    #[doc = "System ID."]
11133    pub target_system: u8,
11134    #[doc = "Component ID."]
11135    pub target_component: u8,
11136    #[doc = "Bus number"]
11137    pub bus: u8,
11138    #[doc = "Frame length"]
11139    pub len: u8,
11140    #[doc = "Frame data"]
11141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11142    pub data: [u8; 8],
11143}
11144impl CAN_FRAME_DATA {
11145    pub const ENCODED_LEN: usize = 16usize;
11146    pub const DEFAULT: Self = Self {
11147        id: 0_u32,
11148        target_system: 0_u8,
11149        target_component: 0_u8,
11150        bus: 0_u8,
11151        len: 0_u8,
11152        data: [0_u8; 8usize],
11153    };
11154    #[cfg(feature = "arbitrary")]
11155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11156        use arbitrary::{Arbitrary, Unstructured};
11157        let mut buf = [0u8; 1024];
11158        rng.fill_bytes(&mut buf);
11159        let mut unstructured = Unstructured::new(&buf);
11160        Self::arbitrary(&mut unstructured).unwrap_or_default()
11161    }
11162}
11163impl Default for CAN_FRAME_DATA {
11164    fn default() -> Self {
11165        Self::DEFAULT.clone()
11166    }
11167}
11168impl MessageData for CAN_FRAME_DATA {
11169    type Message = MavMessage;
11170    const ID: u32 = 386u32;
11171    const NAME: &'static str = "CAN_FRAME";
11172    const EXTRA_CRC: u8 = 132u8;
11173    const ENCODED_LEN: usize = 16usize;
11174    fn deser(
11175        _version: MavlinkVersion,
11176        __input: &[u8],
11177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11178        let avail_len = __input.len();
11179        let mut payload_buf = [0; Self::ENCODED_LEN];
11180        let mut buf = if avail_len < Self::ENCODED_LEN {
11181            payload_buf[0..avail_len].copy_from_slice(__input);
11182            Bytes::new(&payload_buf)
11183        } else {
11184            Bytes::new(__input)
11185        };
11186        let mut __struct = Self::default();
11187        __struct.id = buf.get_u32_le();
11188        __struct.target_system = buf.get_u8();
11189        __struct.target_component = buf.get_u8();
11190        __struct.bus = buf.get_u8();
11191        __struct.len = buf.get_u8();
11192        for v in &mut __struct.data {
11193            let val = buf.get_u8();
11194            *v = val;
11195        }
11196        Ok(__struct)
11197    }
11198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11199        let mut __tmp = BytesMut::new(bytes);
11200        #[allow(clippy::absurd_extreme_comparisons)]
11201        #[allow(unused_comparisons)]
11202        if __tmp.remaining() < Self::ENCODED_LEN {
11203            panic!(
11204                "buffer is too small (need {} bytes, but got {})",
11205                Self::ENCODED_LEN,
11206                __tmp.remaining(),
11207            )
11208        }
11209        __tmp.put_u32_le(self.id);
11210        __tmp.put_u8(self.target_system);
11211        __tmp.put_u8(self.target_component);
11212        __tmp.put_u8(self.bus);
11213        __tmp.put_u8(self.len);
11214        for val in &self.data {
11215            __tmp.put_u8(*val);
11216        }
11217        if matches!(version, MavlinkVersion::V2) {
11218            let len = __tmp.len();
11219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11220        } else {
11221            __tmp.len()
11222        }
11223    }
11224}
11225#[doc = "id: 127"]
11226#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
11227#[derive(Debug, Clone, PartialEq)]
11228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11230pub struct GPS_RTK_DATA {
11231    #[doc = "Time since boot of last baseline message received."]
11232    pub time_last_baseline_ms: u32,
11233    #[doc = "GPS Time of Week of last baseline"]
11234    pub tow: u32,
11235    #[doc = "Current baseline in ECEF x or NED north component."]
11236    pub baseline_a_mm: i32,
11237    #[doc = "Current baseline in ECEF y or NED east component."]
11238    pub baseline_b_mm: i32,
11239    #[doc = "Current baseline in ECEF z or NED down component."]
11240    pub baseline_c_mm: i32,
11241    #[doc = "Current estimate of baseline accuracy."]
11242    pub accuracy: u32,
11243    #[doc = "Current number of integer ambiguity hypotheses."]
11244    pub iar_num_hypotheses: i32,
11245    #[doc = "GPS Week Number of last baseline"]
11246    pub wn: u16,
11247    #[doc = "Identification of connected RTK receiver."]
11248    pub rtk_receiver_id: u8,
11249    #[doc = "GPS-specific health report for RTK data."]
11250    pub rtk_health: u8,
11251    #[doc = "Rate of baseline messages being received by GPS"]
11252    pub rtk_rate: u8,
11253    #[doc = "Current number of sats used for RTK calculation."]
11254    pub nsats: u8,
11255    #[doc = "Coordinate system of baseline"]
11256    pub baseline_coords_type: RtkBaselineCoordinateSystem,
11257}
11258impl GPS_RTK_DATA {
11259    pub const ENCODED_LEN: usize = 35usize;
11260    pub const DEFAULT: Self = Self {
11261        time_last_baseline_ms: 0_u32,
11262        tow: 0_u32,
11263        baseline_a_mm: 0_i32,
11264        baseline_b_mm: 0_i32,
11265        baseline_c_mm: 0_i32,
11266        accuracy: 0_u32,
11267        iar_num_hypotheses: 0_i32,
11268        wn: 0_u16,
11269        rtk_receiver_id: 0_u8,
11270        rtk_health: 0_u8,
11271        rtk_rate: 0_u8,
11272        nsats: 0_u8,
11273        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
11274    };
11275    #[cfg(feature = "arbitrary")]
11276    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11277        use arbitrary::{Arbitrary, Unstructured};
11278        let mut buf = [0u8; 1024];
11279        rng.fill_bytes(&mut buf);
11280        let mut unstructured = Unstructured::new(&buf);
11281        Self::arbitrary(&mut unstructured).unwrap_or_default()
11282    }
11283}
11284impl Default for GPS_RTK_DATA {
11285    fn default() -> Self {
11286        Self::DEFAULT.clone()
11287    }
11288}
11289impl MessageData for GPS_RTK_DATA {
11290    type Message = MavMessage;
11291    const ID: u32 = 127u32;
11292    const NAME: &'static str = "GPS_RTK";
11293    const EXTRA_CRC: u8 = 25u8;
11294    const ENCODED_LEN: usize = 35usize;
11295    fn deser(
11296        _version: MavlinkVersion,
11297        __input: &[u8],
11298    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11299        let avail_len = __input.len();
11300        let mut payload_buf = [0; Self::ENCODED_LEN];
11301        let mut buf = if avail_len < Self::ENCODED_LEN {
11302            payload_buf[0..avail_len].copy_from_slice(__input);
11303            Bytes::new(&payload_buf)
11304        } else {
11305            Bytes::new(__input)
11306        };
11307        let mut __struct = Self::default();
11308        __struct.time_last_baseline_ms = buf.get_u32_le();
11309        __struct.tow = buf.get_u32_le();
11310        __struct.baseline_a_mm = buf.get_i32_le();
11311        __struct.baseline_b_mm = buf.get_i32_le();
11312        __struct.baseline_c_mm = buf.get_i32_le();
11313        __struct.accuracy = buf.get_u32_le();
11314        __struct.iar_num_hypotheses = buf.get_i32_le();
11315        __struct.wn = buf.get_u16_le();
11316        __struct.rtk_receiver_id = buf.get_u8();
11317        __struct.rtk_health = buf.get_u8();
11318        __struct.rtk_rate = buf.get_u8();
11319        __struct.nsats = buf.get_u8();
11320        let tmp = buf.get_u8();
11321        __struct.baseline_coords_type =
11322            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11323                enum_type: "RtkBaselineCoordinateSystem",
11324                value: tmp as u32,
11325            })?;
11326        Ok(__struct)
11327    }
11328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11329        let mut __tmp = BytesMut::new(bytes);
11330        #[allow(clippy::absurd_extreme_comparisons)]
11331        #[allow(unused_comparisons)]
11332        if __tmp.remaining() < Self::ENCODED_LEN {
11333            panic!(
11334                "buffer is too small (need {} bytes, but got {})",
11335                Self::ENCODED_LEN,
11336                __tmp.remaining(),
11337            )
11338        }
11339        __tmp.put_u32_le(self.time_last_baseline_ms);
11340        __tmp.put_u32_le(self.tow);
11341        __tmp.put_i32_le(self.baseline_a_mm);
11342        __tmp.put_i32_le(self.baseline_b_mm);
11343        __tmp.put_i32_le(self.baseline_c_mm);
11344        __tmp.put_u32_le(self.accuracy);
11345        __tmp.put_i32_le(self.iar_num_hypotheses);
11346        __tmp.put_u16_le(self.wn);
11347        __tmp.put_u8(self.rtk_receiver_id);
11348        __tmp.put_u8(self.rtk_health);
11349        __tmp.put_u8(self.rtk_rate);
11350        __tmp.put_u8(self.nsats);
11351        __tmp.put_u8(self.baseline_coords_type as u8);
11352        if matches!(version, MavlinkVersion::V2) {
11353            let len = __tmp.len();
11354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11355        } else {
11356            __tmp.len()
11357        }
11358    }
11359}
11360#[doc = "id: 12902"]
11361#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
11362#[derive(Debug, Clone, PartialEq)]
11363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11365pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
11366    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
11367    pub timestamp: u32,
11368    #[doc = "System ID (0 for broadcast)."]
11369    pub target_system: u8,
11370    #[doc = "Component ID (0 for broadcast)."]
11371    pub target_component: u8,
11372    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
11373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11374    pub id_or_mac: [u8; 20],
11375    #[doc = "Indicates the type of authentication."]
11376    pub authentication_type: MavOdidAuthType,
11377    #[doc = "Allowed range is 0 - 15."]
11378    pub data_page: u8,
11379    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
11380    pub last_page_index: u8,
11381    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
11382    pub length: u8,
11383    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
11384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11385    pub authentication_data: [u8; 23],
11386}
11387impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
11388    pub const ENCODED_LEN: usize = 53usize;
11389    pub const DEFAULT: Self = Self {
11390        timestamp: 0_u32,
11391        target_system: 0_u8,
11392        target_component: 0_u8,
11393        id_or_mac: [0_u8; 20usize],
11394        authentication_type: MavOdidAuthType::DEFAULT,
11395        data_page: 0_u8,
11396        last_page_index: 0_u8,
11397        length: 0_u8,
11398        authentication_data: [0_u8; 23usize],
11399    };
11400    #[cfg(feature = "arbitrary")]
11401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11402        use arbitrary::{Arbitrary, Unstructured};
11403        let mut buf = [0u8; 1024];
11404        rng.fill_bytes(&mut buf);
11405        let mut unstructured = Unstructured::new(&buf);
11406        Self::arbitrary(&mut unstructured).unwrap_or_default()
11407    }
11408}
11409impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
11410    fn default() -> Self {
11411        Self::DEFAULT.clone()
11412    }
11413}
11414impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
11415    type Message = MavMessage;
11416    const ID: u32 = 12902u32;
11417    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
11418    const EXTRA_CRC: u8 = 140u8;
11419    const ENCODED_LEN: usize = 53usize;
11420    fn deser(
11421        _version: MavlinkVersion,
11422        __input: &[u8],
11423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11424        let avail_len = __input.len();
11425        let mut payload_buf = [0; Self::ENCODED_LEN];
11426        let mut buf = if avail_len < Self::ENCODED_LEN {
11427            payload_buf[0..avail_len].copy_from_slice(__input);
11428            Bytes::new(&payload_buf)
11429        } else {
11430            Bytes::new(__input)
11431        };
11432        let mut __struct = Self::default();
11433        __struct.timestamp = buf.get_u32_le();
11434        __struct.target_system = buf.get_u8();
11435        __struct.target_component = buf.get_u8();
11436        for v in &mut __struct.id_or_mac {
11437            let val = buf.get_u8();
11438            *v = val;
11439        }
11440        let tmp = buf.get_u8();
11441        __struct.authentication_type =
11442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11443                enum_type: "MavOdidAuthType",
11444                value: tmp as u32,
11445            })?;
11446        __struct.data_page = buf.get_u8();
11447        __struct.last_page_index = buf.get_u8();
11448        __struct.length = buf.get_u8();
11449        for v in &mut __struct.authentication_data {
11450            let val = buf.get_u8();
11451            *v = val;
11452        }
11453        Ok(__struct)
11454    }
11455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11456        let mut __tmp = BytesMut::new(bytes);
11457        #[allow(clippy::absurd_extreme_comparisons)]
11458        #[allow(unused_comparisons)]
11459        if __tmp.remaining() < Self::ENCODED_LEN {
11460            panic!(
11461                "buffer is too small (need {} bytes, but got {})",
11462                Self::ENCODED_LEN,
11463                __tmp.remaining(),
11464            )
11465        }
11466        __tmp.put_u32_le(self.timestamp);
11467        __tmp.put_u8(self.target_system);
11468        __tmp.put_u8(self.target_component);
11469        for val in &self.id_or_mac {
11470            __tmp.put_u8(*val);
11471        }
11472        __tmp.put_u8(self.authentication_type as u8);
11473        __tmp.put_u8(self.data_page);
11474        __tmp.put_u8(self.last_page_index);
11475        __tmp.put_u8(self.length);
11476        for val in &self.authentication_data {
11477            __tmp.put_u8(*val);
11478        }
11479        if matches!(version, MavlinkVersion::V2) {
11480            let len = __tmp.len();
11481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11482        } else {
11483            __tmp.len()
11484        }
11485    }
11486}
11487#[doc = "id: 119"]
11488#[doc = "Request a chunk of a log."]
11489#[derive(Debug, Clone, PartialEq)]
11490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11492pub struct LOG_REQUEST_DATA_DATA {
11493    #[doc = "Offset into the log"]
11494    pub ofs: u32,
11495    #[doc = "Number of bytes"]
11496    pub count: u32,
11497    #[doc = "Log id (from LOG_ENTRY reply)"]
11498    pub id: u16,
11499    #[doc = "System ID"]
11500    pub target_system: u8,
11501    #[doc = "Component ID"]
11502    pub target_component: u8,
11503}
11504impl LOG_REQUEST_DATA_DATA {
11505    pub const ENCODED_LEN: usize = 12usize;
11506    pub const DEFAULT: Self = Self {
11507        ofs: 0_u32,
11508        count: 0_u32,
11509        id: 0_u16,
11510        target_system: 0_u8,
11511        target_component: 0_u8,
11512    };
11513    #[cfg(feature = "arbitrary")]
11514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11515        use arbitrary::{Arbitrary, Unstructured};
11516        let mut buf = [0u8; 1024];
11517        rng.fill_bytes(&mut buf);
11518        let mut unstructured = Unstructured::new(&buf);
11519        Self::arbitrary(&mut unstructured).unwrap_or_default()
11520    }
11521}
11522impl Default for LOG_REQUEST_DATA_DATA {
11523    fn default() -> Self {
11524        Self::DEFAULT.clone()
11525    }
11526}
11527impl MessageData for LOG_REQUEST_DATA_DATA {
11528    type Message = MavMessage;
11529    const ID: u32 = 119u32;
11530    const NAME: &'static str = "LOG_REQUEST_DATA";
11531    const EXTRA_CRC: u8 = 116u8;
11532    const ENCODED_LEN: usize = 12usize;
11533    fn deser(
11534        _version: MavlinkVersion,
11535        __input: &[u8],
11536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11537        let avail_len = __input.len();
11538        let mut payload_buf = [0; Self::ENCODED_LEN];
11539        let mut buf = if avail_len < Self::ENCODED_LEN {
11540            payload_buf[0..avail_len].copy_from_slice(__input);
11541            Bytes::new(&payload_buf)
11542        } else {
11543            Bytes::new(__input)
11544        };
11545        let mut __struct = Self::default();
11546        __struct.ofs = buf.get_u32_le();
11547        __struct.count = buf.get_u32_le();
11548        __struct.id = buf.get_u16_le();
11549        __struct.target_system = buf.get_u8();
11550        __struct.target_component = buf.get_u8();
11551        Ok(__struct)
11552    }
11553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11554        let mut __tmp = BytesMut::new(bytes);
11555        #[allow(clippy::absurd_extreme_comparisons)]
11556        #[allow(unused_comparisons)]
11557        if __tmp.remaining() < Self::ENCODED_LEN {
11558            panic!(
11559                "buffer is too small (need {} bytes, but got {})",
11560                Self::ENCODED_LEN,
11561                __tmp.remaining(),
11562            )
11563        }
11564        __tmp.put_u32_le(self.ofs);
11565        __tmp.put_u32_le(self.count);
11566        __tmp.put_u16_le(self.id);
11567        __tmp.put_u8(self.target_system);
11568        __tmp.put_u8(self.target_component);
11569        if matches!(version, MavlinkVersion::V2) {
11570            let len = __tmp.len();
11571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11572        } else {
11573            __tmp.len()
11574        }
11575    }
11576}
11577#[doc = "id: 69"]
11578#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
11579#[derive(Debug, Clone, PartialEq)]
11580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11582pub struct MANUAL_CONTROL_DATA {
11583    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
11584    pub x: i16,
11585    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
11586    pub y: i16,
11587    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
11588    pub z: i16,
11589    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
11590    pub r: i16,
11591    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
11592    pub buttons: u16,
11593    #[doc = "The system to be controlled."]
11594    pub target: u8,
11595    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
11596    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11597    pub buttons2: u16,
11598    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
11599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11600    pub enabled_extensions: u8,
11601    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
11602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11603    pub s: i16,
11604    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
11605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11606    pub t: i16,
11607    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
11608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11609    pub aux1: i16,
11610    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
11611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11612    pub aux2: i16,
11613    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
11614    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11615    pub aux3: i16,
11616    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
11617    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11618    pub aux4: i16,
11619    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
11620    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11621    pub aux5: i16,
11622    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
11623    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11624    pub aux6: i16,
11625}
11626impl MANUAL_CONTROL_DATA {
11627    pub const ENCODED_LEN: usize = 30usize;
11628    pub const DEFAULT: Self = Self {
11629        x: 0_i16,
11630        y: 0_i16,
11631        z: 0_i16,
11632        r: 0_i16,
11633        buttons: 0_u16,
11634        target: 0_u8,
11635        buttons2: 0_u16,
11636        enabled_extensions: 0_u8,
11637        s: 0_i16,
11638        t: 0_i16,
11639        aux1: 0_i16,
11640        aux2: 0_i16,
11641        aux3: 0_i16,
11642        aux4: 0_i16,
11643        aux5: 0_i16,
11644        aux6: 0_i16,
11645    };
11646    #[cfg(feature = "arbitrary")]
11647    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11648        use arbitrary::{Arbitrary, Unstructured};
11649        let mut buf = [0u8; 1024];
11650        rng.fill_bytes(&mut buf);
11651        let mut unstructured = Unstructured::new(&buf);
11652        Self::arbitrary(&mut unstructured).unwrap_or_default()
11653    }
11654}
11655impl Default for MANUAL_CONTROL_DATA {
11656    fn default() -> Self {
11657        Self::DEFAULT.clone()
11658    }
11659}
11660impl MessageData for MANUAL_CONTROL_DATA {
11661    type Message = MavMessage;
11662    const ID: u32 = 69u32;
11663    const NAME: &'static str = "MANUAL_CONTROL";
11664    const EXTRA_CRC: u8 = 243u8;
11665    const ENCODED_LEN: usize = 30usize;
11666    fn deser(
11667        _version: MavlinkVersion,
11668        __input: &[u8],
11669    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11670        let avail_len = __input.len();
11671        let mut payload_buf = [0; Self::ENCODED_LEN];
11672        let mut buf = if avail_len < Self::ENCODED_LEN {
11673            payload_buf[0..avail_len].copy_from_slice(__input);
11674            Bytes::new(&payload_buf)
11675        } else {
11676            Bytes::new(__input)
11677        };
11678        let mut __struct = Self::default();
11679        __struct.x = buf.get_i16_le();
11680        __struct.y = buf.get_i16_le();
11681        __struct.z = buf.get_i16_le();
11682        __struct.r = buf.get_i16_le();
11683        __struct.buttons = buf.get_u16_le();
11684        __struct.target = buf.get_u8();
11685        __struct.buttons2 = buf.get_u16_le();
11686        __struct.enabled_extensions = buf.get_u8();
11687        __struct.s = buf.get_i16_le();
11688        __struct.t = buf.get_i16_le();
11689        __struct.aux1 = buf.get_i16_le();
11690        __struct.aux2 = buf.get_i16_le();
11691        __struct.aux3 = buf.get_i16_le();
11692        __struct.aux4 = buf.get_i16_le();
11693        __struct.aux5 = buf.get_i16_le();
11694        __struct.aux6 = buf.get_i16_le();
11695        Ok(__struct)
11696    }
11697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11698        let mut __tmp = BytesMut::new(bytes);
11699        #[allow(clippy::absurd_extreme_comparisons)]
11700        #[allow(unused_comparisons)]
11701        if __tmp.remaining() < Self::ENCODED_LEN {
11702            panic!(
11703                "buffer is too small (need {} bytes, but got {})",
11704                Self::ENCODED_LEN,
11705                __tmp.remaining(),
11706            )
11707        }
11708        __tmp.put_i16_le(self.x);
11709        __tmp.put_i16_le(self.y);
11710        __tmp.put_i16_le(self.z);
11711        __tmp.put_i16_le(self.r);
11712        __tmp.put_u16_le(self.buttons);
11713        __tmp.put_u8(self.target);
11714        __tmp.put_u16_le(self.buttons2);
11715        __tmp.put_u8(self.enabled_extensions);
11716        __tmp.put_i16_le(self.s);
11717        __tmp.put_i16_le(self.t);
11718        __tmp.put_i16_le(self.aux1);
11719        __tmp.put_i16_le(self.aux2);
11720        __tmp.put_i16_le(self.aux3);
11721        __tmp.put_i16_le(self.aux4);
11722        __tmp.put_i16_le(self.aux5);
11723        __tmp.put_i16_le(self.aux6);
11724        if matches!(version, MavlinkVersion::V2) {
11725            let len = __tmp.len();
11726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11727        } else {
11728            __tmp.len()
11729        }
11730    }
11731}
11732#[doc = "id: 1"]
11733#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
11734#[derive(Debug, Clone, PartialEq)]
11735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11737pub struct SYS_STATUS_DATA {
11738    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
11739    pub onboard_control_sensors_present: MavSysStatusSensor,
11740    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
11741    pub onboard_control_sensors_enabled: MavSysStatusSensor,
11742    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
11743    pub onboard_control_sensors_health: MavSysStatusSensor,
11744    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
11745    pub load: u16,
11746    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
11747    pub voltage_battery: u16,
11748    #[doc = "Battery current, -1: Current not sent by autopilot"]
11749    pub current_battery: i16,
11750    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
11751    pub drop_rate_comm: u16,
11752    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
11753    pub errors_comm: u16,
11754    #[doc = "Autopilot-specific errors"]
11755    pub errors_count1: u16,
11756    #[doc = "Autopilot-specific errors"]
11757    pub errors_count2: u16,
11758    #[doc = "Autopilot-specific errors"]
11759    pub errors_count3: u16,
11760    #[doc = "Autopilot-specific errors"]
11761    pub errors_count4: u16,
11762    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
11763    pub battery_remaining: i8,
11764    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
11765    #[cfg_attr(feature = "serde", serde(default))]
11766    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
11767    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
11768    #[cfg_attr(feature = "serde", serde(default))]
11769    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
11770    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
11771    #[cfg_attr(feature = "serde", serde(default))]
11772    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
11773}
11774impl SYS_STATUS_DATA {
11775    pub const ENCODED_LEN: usize = 43usize;
11776    pub const DEFAULT: Self = Self {
11777        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
11778        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
11779        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
11780        load: 0_u16,
11781        voltage_battery: 0_u16,
11782        current_battery: 0_i16,
11783        drop_rate_comm: 0_u16,
11784        errors_comm: 0_u16,
11785        errors_count1: 0_u16,
11786        errors_count2: 0_u16,
11787        errors_count3: 0_u16,
11788        errors_count4: 0_u16,
11789        battery_remaining: 0_i8,
11790        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
11791        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
11792        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
11793    };
11794    #[cfg(feature = "arbitrary")]
11795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11796        use arbitrary::{Arbitrary, Unstructured};
11797        let mut buf = [0u8; 1024];
11798        rng.fill_bytes(&mut buf);
11799        let mut unstructured = Unstructured::new(&buf);
11800        Self::arbitrary(&mut unstructured).unwrap_or_default()
11801    }
11802}
11803impl Default for SYS_STATUS_DATA {
11804    fn default() -> Self {
11805        Self::DEFAULT.clone()
11806    }
11807}
11808impl MessageData for SYS_STATUS_DATA {
11809    type Message = MavMessage;
11810    const ID: u32 = 1u32;
11811    const NAME: &'static str = "SYS_STATUS";
11812    const EXTRA_CRC: u8 = 124u8;
11813    const ENCODED_LEN: usize = 43usize;
11814    fn deser(
11815        _version: MavlinkVersion,
11816        __input: &[u8],
11817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11818        let avail_len = __input.len();
11819        let mut payload_buf = [0; Self::ENCODED_LEN];
11820        let mut buf = if avail_len < Self::ENCODED_LEN {
11821            payload_buf[0..avail_len].copy_from_slice(__input);
11822            Bytes::new(&payload_buf)
11823        } else {
11824            Bytes::new(__input)
11825        };
11826        let mut __struct = Self::default();
11827        let tmp = buf.get_u32_le();
11828        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
11829            tmp & MavSysStatusSensor::all().bits(),
11830        )
11831        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11832            flag_type: "MavSysStatusSensor",
11833            value: tmp as u32,
11834        })?;
11835        let tmp = buf.get_u32_le();
11836        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
11837            tmp & MavSysStatusSensor::all().bits(),
11838        )
11839        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11840            flag_type: "MavSysStatusSensor",
11841            value: tmp as u32,
11842        })?;
11843        let tmp = buf.get_u32_le();
11844        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
11845            tmp & MavSysStatusSensor::all().bits(),
11846        )
11847        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11848            flag_type: "MavSysStatusSensor",
11849            value: tmp as u32,
11850        })?;
11851        __struct.load = buf.get_u16_le();
11852        __struct.voltage_battery = buf.get_u16_le();
11853        __struct.current_battery = buf.get_i16_le();
11854        __struct.drop_rate_comm = buf.get_u16_le();
11855        __struct.errors_comm = buf.get_u16_le();
11856        __struct.errors_count1 = buf.get_u16_le();
11857        __struct.errors_count2 = buf.get_u16_le();
11858        __struct.errors_count3 = buf.get_u16_le();
11859        __struct.errors_count4 = buf.get_u16_le();
11860        __struct.battery_remaining = buf.get_i8();
11861        let tmp = buf.get_u32_le();
11862        __struct.onboard_control_sensors_present_extended =
11863            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
11864                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11865                flag_type: "MavSysStatusSensorExtended",
11866                value: tmp as u32,
11867            })?;
11868        let tmp = buf.get_u32_le();
11869        __struct.onboard_control_sensors_enabled_extended =
11870            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
11871                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11872                flag_type: "MavSysStatusSensorExtended",
11873                value: tmp as u32,
11874            })?;
11875        let tmp = buf.get_u32_le();
11876        __struct.onboard_control_sensors_health_extended =
11877            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
11878                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11879                flag_type: "MavSysStatusSensorExtended",
11880                value: tmp as u32,
11881            })?;
11882        Ok(__struct)
11883    }
11884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11885        let mut __tmp = BytesMut::new(bytes);
11886        #[allow(clippy::absurd_extreme_comparisons)]
11887        #[allow(unused_comparisons)]
11888        if __tmp.remaining() < Self::ENCODED_LEN {
11889            panic!(
11890                "buffer is too small (need {} bytes, but got {})",
11891                Self::ENCODED_LEN,
11892                __tmp.remaining(),
11893            )
11894        }
11895        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
11896        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
11897        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
11898        __tmp.put_u16_le(self.load);
11899        __tmp.put_u16_le(self.voltage_battery);
11900        __tmp.put_i16_le(self.current_battery);
11901        __tmp.put_u16_le(self.drop_rate_comm);
11902        __tmp.put_u16_le(self.errors_comm);
11903        __tmp.put_u16_le(self.errors_count1);
11904        __tmp.put_u16_le(self.errors_count2);
11905        __tmp.put_u16_le(self.errors_count3);
11906        __tmp.put_u16_le(self.errors_count4);
11907        __tmp.put_i8(self.battery_remaining);
11908        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
11909        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
11910        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
11911        if matches!(version, MavlinkVersion::V2) {
11912            let len = __tmp.len();
11913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11914        } else {
11915            __tmp.len()
11916        }
11917    }
11918}
11919#[doc = "id: 63"]
11920#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
11921#[derive(Debug, Clone, PartialEq)]
11922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11924pub struct GLOBAL_POSITION_INT_COV_DATA {
11925    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11926    pub time_usec: u64,
11927    #[doc = "Latitude"]
11928    pub lat: i32,
11929    #[doc = "Longitude"]
11930    pub lon: i32,
11931    #[doc = "Altitude in meters above MSL"]
11932    pub alt: i32,
11933    #[doc = "Altitude above ground"]
11934    pub relative_alt: i32,
11935    #[doc = "Ground X Speed (Latitude)"]
11936    pub vx: f32,
11937    #[doc = "Ground Y Speed (Longitude)"]
11938    pub vy: f32,
11939    #[doc = "Ground Z Speed (Altitude)"]
11940    pub vz: f32,
11941    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
11942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11943    pub covariance: [f32; 36],
11944    #[doc = "Class id of the estimator this estimate originated from."]
11945    pub estimator_type: MavEstimatorType,
11946}
11947impl GLOBAL_POSITION_INT_COV_DATA {
11948    pub const ENCODED_LEN: usize = 181usize;
11949    pub const DEFAULT: Self = Self {
11950        time_usec: 0_u64,
11951        lat: 0_i32,
11952        lon: 0_i32,
11953        alt: 0_i32,
11954        relative_alt: 0_i32,
11955        vx: 0.0_f32,
11956        vy: 0.0_f32,
11957        vz: 0.0_f32,
11958        covariance: [0.0_f32; 36usize],
11959        estimator_type: MavEstimatorType::DEFAULT,
11960    };
11961    #[cfg(feature = "arbitrary")]
11962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11963        use arbitrary::{Arbitrary, Unstructured};
11964        let mut buf = [0u8; 1024];
11965        rng.fill_bytes(&mut buf);
11966        let mut unstructured = Unstructured::new(&buf);
11967        Self::arbitrary(&mut unstructured).unwrap_or_default()
11968    }
11969}
11970impl Default for GLOBAL_POSITION_INT_COV_DATA {
11971    fn default() -> Self {
11972        Self::DEFAULT.clone()
11973    }
11974}
11975impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
11976    type Message = MavMessage;
11977    const ID: u32 = 63u32;
11978    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
11979    const EXTRA_CRC: u8 = 119u8;
11980    const ENCODED_LEN: usize = 181usize;
11981    fn deser(
11982        _version: MavlinkVersion,
11983        __input: &[u8],
11984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11985        let avail_len = __input.len();
11986        let mut payload_buf = [0; Self::ENCODED_LEN];
11987        let mut buf = if avail_len < Self::ENCODED_LEN {
11988            payload_buf[0..avail_len].copy_from_slice(__input);
11989            Bytes::new(&payload_buf)
11990        } else {
11991            Bytes::new(__input)
11992        };
11993        let mut __struct = Self::default();
11994        __struct.time_usec = buf.get_u64_le();
11995        __struct.lat = buf.get_i32_le();
11996        __struct.lon = buf.get_i32_le();
11997        __struct.alt = buf.get_i32_le();
11998        __struct.relative_alt = buf.get_i32_le();
11999        __struct.vx = buf.get_f32_le();
12000        __struct.vy = buf.get_f32_le();
12001        __struct.vz = buf.get_f32_le();
12002        for v in &mut __struct.covariance {
12003            let val = buf.get_f32_le();
12004            *v = val;
12005        }
12006        let tmp = buf.get_u8();
12007        __struct.estimator_type =
12008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12009                enum_type: "MavEstimatorType",
12010                value: tmp as u32,
12011            })?;
12012        Ok(__struct)
12013    }
12014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12015        let mut __tmp = BytesMut::new(bytes);
12016        #[allow(clippy::absurd_extreme_comparisons)]
12017        #[allow(unused_comparisons)]
12018        if __tmp.remaining() < Self::ENCODED_LEN {
12019            panic!(
12020                "buffer is too small (need {} bytes, but got {})",
12021                Self::ENCODED_LEN,
12022                __tmp.remaining(),
12023            )
12024        }
12025        __tmp.put_u64_le(self.time_usec);
12026        __tmp.put_i32_le(self.lat);
12027        __tmp.put_i32_le(self.lon);
12028        __tmp.put_i32_le(self.alt);
12029        __tmp.put_i32_le(self.relative_alt);
12030        __tmp.put_f32_le(self.vx);
12031        __tmp.put_f32_le(self.vy);
12032        __tmp.put_f32_le(self.vz);
12033        for val in &self.covariance {
12034            __tmp.put_f32_le(*val);
12035        }
12036        __tmp.put_u8(self.estimator_type as u8);
12037        if matches!(version, MavlinkVersion::V2) {
12038            let len = __tmp.len();
12039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12040        } else {
12041            __tmp.len()
12042        }
12043    }
12044}
12045#[doc = "id: 192"]
12046#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
12047#[derive(Debug, Clone, PartialEq)]
12048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12050pub struct MAG_CAL_REPORT_DATA {
12051    #[doc = "RMS milligauss residuals."]
12052    pub fitness: f32,
12053    #[doc = "X offset."]
12054    pub ofs_x: f32,
12055    #[doc = "Y offset."]
12056    pub ofs_y: f32,
12057    #[doc = "Z offset."]
12058    pub ofs_z: f32,
12059    #[doc = "X diagonal (matrix 11)."]
12060    pub diag_x: f32,
12061    #[doc = "Y diagonal (matrix 22)."]
12062    pub diag_y: f32,
12063    #[doc = "Z diagonal (matrix 33)."]
12064    pub diag_z: f32,
12065    #[doc = "X off-diagonal (matrix 12 and 21)."]
12066    pub offdiag_x: f32,
12067    #[doc = "Y off-diagonal (matrix 13 and 31)."]
12068    pub offdiag_y: f32,
12069    #[doc = "Z off-diagonal (matrix 32 and 23)."]
12070    pub offdiag_z: f32,
12071    #[doc = "Compass being calibrated."]
12072    pub compass_id: u8,
12073    #[doc = "Bitmask of compasses being calibrated."]
12074    pub cal_mask: u8,
12075    #[doc = "Calibration Status."]
12076    pub cal_status: MagCalStatus,
12077    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
12078    pub autosaved: u8,
12079    #[doc = "Confidence in orientation (higher is better)."]
12080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12081    pub orientation_confidence: f32,
12082    #[doc = "orientation before calibration."]
12083    #[cfg_attr(feature = "serde", serde(default))]
12084    pub old_orientation: MavSensorOrientation,
12085    #[doc = "orientation after calibration."]
12086    #[cfg_attr(feature = "serde", serde(default))]
12087    pub new_orientation: MavSensorOrientation,
12088    #[doc = "field radius correction factor"]
12089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12090    pub scale_factor: f32,
12091}
12092impl MAG_CAL_REPORT_DATA {
12093    pub const ENCODED_LEN: usize = 54usize;
12094    pub const DEFAULT: Self = Self {
12095        fitness: 0.0_f32,
12096        ofs_x: 0.0_f32,
12097        ofs_y: 0.0_f32,
12098        ofs_z: 0.0_f32,
12099        diag_x: 0.0_f32,
12100        diag_y: 0.0_f32,
12101        diag_z: 0.0_f32,
12102        offdiag_x: 0.0_f32,
12103        offdiag_y: 0.0_f32,
12104        offdiag_z: 0.0_f32,
12105        compass_id: 0_u8,
12106        cal_mask: 0_u8,
12107        cal_status: MagCalStatus::DEFAULT,
12108        autosaved: 0_u8,
12109        orientation_confidence: 0.0_f32,
12110        old_orientation: MavSensorOrientation::DEFAULT,
12111        new_orientation: MavSensorOrientation::DEFAULT,
12112        scale_factor: 0.0_f32,
12113    };
12114    #[cfg(feature = "arbitrary")]
12115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12116        use arbitrary::{Arbitrary, Unstructured};
12117        let mut buf = [0u8; 1024];
12118        rng.fill_bytes(&mut buf);
12119        let mut unstructured = Unstructured::new(&buf);
12120        Self::arbitrary(&mut unstructured).unwrap_or_default()
12121    }
12122}
12123impl Default for MAG_CAL_REPORT_DATA {
12124    fn default() -> Self {
12125        Self::DEFAULT.clone()
12126    }
12127}
12128impl MessageData for MAG_CAL_REPORT_DATA {
12129    type Message = MavMessage;
12130    const ID: u32 = 192u32;
12131    const NAME: &'static str = "MAG_CAL_REPORT";
12132    const EXTRA_CRC: u8 = 36u8;
12133    const ENCODED_LEN: usize = 54usize;
12134    fn deser(
12135        _version: MavlinkVersion,
12136        __input: &[u8],
12137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12138        let avail_len = __input.len();
12139        let mut payload_buf = [0; Self::ENCODED_LEN];
12140        let mut buf = if avail_len < Self::ENCODED_LEN {
12141            payload_buf[0..avail_len].copy_from_slice(__input);
12142            Bytes::new(&payload_buf)
12143        } else {
12144            Bytes::new(__input)
12145        };
12146        let mut __struct = Self::default();
12147        __struct.fitness = buf.get_f32_le();
12148        __struct.ofs_x = buf.get_f32_le();
12149        __struct.ofs_y = buf.get_f32_le();
12150        __struct.ofs_z = buf.get_f32_le();
12151        __struct.diag_x = buf.get_f32_le();
12152        __struct.diag_y = buf.get_f32_le();
12153        __struct.diag_z = buf.get_f32_le();
12154        __struct.offdiag_x = buf.get_f32_le();
12155        __struct.offdiag_y = buf.get_f32_le();
12156        __struct.offdiag_z = buf.get_f32_le();
12157        __struct.compass_id = buf.get_u8();
12158        __struct.cal_mask = buf.get_u8();
12159        let tmp = buf.get_u8();
12160        __struct.cal_status =
12161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12162                enum_type: "MagCalStatus",
12163                value: tmp as u32,
12164            })?;
12165        __struct.autosaved = buf.get_u8();
12166        __struct.orientation_confidence = buf.get_f32_le();
12167        let tmp = buf.get_u8();
12168        __struct.old_orientation =
12169            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12170                enum_type: "MavSensorOrientation",
12171                value: tmp as u32,
12172            })?;
12173        let tmp = buf.get_u8();
12174        __struct.new_orientation =
12175            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12176                enum_type: "MavSensorOrientation",
12177                value: tmp as u32,
12178            })?;
12179        __struct.scale_factor = buf.get_f32_le();
12180        Ok(__struct)
12181    }
12182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12183        let mut __tmp = BytesMut::new(bytes);
12184        #[allow(clippy::absurd_extreme_comparisons)]
12185        #[allow(unused_comparisons)]
12186        if __tmp.remaining() < Self::ENCODED_LEN {
12187            panic!(
12188                "buffer is too small (need {} bytes, but got {})",
12189                Self::ENCODED_LEN,
12190                __tmp.remaining(),
12191            )
12192        }
12193        __tmp.put_f32_le(self.fitness);
12194        __tmp.put_f32_le(self.ofs_x);
12195        __tmp.put_f32_le(self.ofs_y);
12196        __tmp.put_f32_le(self.ofs_z);
12197        __tmp.put_f32_le(self.diag_x);
12198        __tmp.put_f32_le(self.diag_y);
12199        __tmp.put_f32_le(self.diag_z);
12200        __tmp.put_f32_le(self.offdiag_x);
12201        __tmp.put_f32_le(self.offdiag_y);
12202        __tmp.put_f32_le(self.offdiag_z);
12203        __tmp.put_u8(self.compass_id);
12204        __tmp.put_u8(self.cal_mask);
12205        __tmp.put_u8(self.cal_status as u8);
12206        __tmp.put_u8(self.autosaved);
12207        __tmp.put_f32_le(self.orientation_confidence);
12208        __tmp.put_u8(self.old_orientation as u8);
12209        __tmp.put_u8(self.new_orientation as u8);
12210        __tmp.put_f32_le(self.scale_factor);
12211        if matches!(version, MavlinkVersion::V2) {
12212            let len = __tmp.len();
12213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12214        } else {
12215            __tmp.len()
12216        }
12217    }
12218}
12219#[doc = "id: 116"]
12220#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
12221#[derive(Debug, Clone, PartialEq)]
12222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12224pub struct SCALED_IMU2_DATA {
12225    #[doc = "Timestamp (time since system boot)."]
12226    pub time_boot_ms: u32,
12227    #[doc = "X acceleration"]
12228    pub xacc: i16,
12229    #[doc = "Y acceleration"]
12230    pub yacc: i16,
12231    #[doc = "Z acceleration"]
12232    pub zacc: i16,
12233    #[doc = "Angular speed around X axis"]
12234    pub xgyro: i16,
12235    #[doc = "Angular speed around Y axis"]
12236    pub ygyro: i16,
12237    #[doc = "Angular speed around Z axis"]
12238    pub zgyro: i16,
12239    #[doc = "X Magnetic field"]
12240    pub xmag: i16,
12241    #[doc = "Y Magnetic field"]
12242    pub ymag: i16,
12243    #[doc = "Z Magnetic field"]
12244    pub zmag: i16,
12245    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
12246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12247    pub temperature: i16,
12248}
12249impl SCALED_IMU2_DATA {
12250    pub const ENCODED_LEN: usize = 24usize;
12251    pub const DEFAULT: Self = Self {
12252        time_boot_ms: 0_u32,
12253        xacc: 0_i16,
12254        yacc: 0_i16,
12255        zacc: 0_i16,
12256        xgyro: 0_i16,
12257        ygyro: 0_i16,
12258        zgyro: 0_i16,
12259        xmag: 0_i16,
12260        ymag: 0_i16,
12261        zmag: 0_i16,
12262        temperature: 0_i16,
12263    };
12264    #[cfg(feature = "arbitrary")]
12265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12266        use arbitrary::{Arbitrary, Unstructured};
12267        let mut buf = [0u8; 1024];
12268        rng.fill_bytes(&mut buf);
12269        let mut unstructured = Unstructured::new(&buf);
12270        Self::arbitrary(&mut unstructured).unwrap_or_default()
12271    }
12272}
12273impl Default for SCALED_IMU2_DATA {
12274    fn default() -> Self {
12275        Self::DEFAULT.clone()
12276    }
12277}
12278impl MessageData for SCALED_IMU2_DATA {
12279    type Message = MavMessage;
12280    const ID: u32 = 116u32;
12281    const NAME: &'static str = "SCALED_IMU2";
12282    const EXTRA_CRC: u8 = 76u8;
12283    const ENCODED_LEN: usize = 24usize;
12284    fn deser(
12285        _version: MavlinkVersion,
12286        __input: &[u8],
12287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12288        let avail_len = __input.len();
12289        let mut payload_buf = [0; Self::ENCODED_LEN];
12290        let mut buf = if avail_len < Self::ENCODED_LEN {
12291            payload_buf[0..avail_len].copy_from_slice(__input);
12292            Bytes::new(&payload_buf)
12293        } else {
12294            Bytes::new(__input)
12295        };
12296        let mut __struct = Self::default();
12297        __struct.time_boot_ms = buf.get_u32_le();
12298        __struct.xacc = buf.get_i16_le();
12299        __struct.yacc = buf.get_i16_le();
12300        __struct.zacc = buf.get_i16_le();
12301        __struct.xgyro = buf.get_i16_le();
12302        __struct.ygyro = buf.get_i16_le();
12303        __struct.zgyro = buf.get_i16_le();
12304        __struct.xmag = buf.get_i16_le();
12305        __struct.ymag = buf.get_i16_le();
12306        __struct.zmag = buf.get_i16_le();
12307        __struct.temperature = buf.get_i16_le();
12308        Ok(__struct)
12309    }
12310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12311        let mut __tmp = BytesMut::new(bytes);
12312        #[allow(clippy::absurd_extreme_comparisons)]
12313        #[allow(unused_comparisons)]
12314        if __tmp.remaining() < Self::ENCODED_LEN {
12315            panic!(
12316                "buffer is too small (need {} bytes, but got {})",
12317                Self::ENCODED_LEN,
12318                __tmp.remaining(),
12319            )
12320        }
12321        __tmp.put_u32_le(self.time_boot_ms);
12322        __tmp.put_i16_le(self.xacc);
12323        __tmp.put_i16_le(self.yacc);
12324        __tmp.put_i16_le(self.zacc);
12325        __tmp.put_i16_le(self.xgyro);
12326        __tmp.put_i16_le(self.ygyro);
12327        __tmp.put_i16_le(self.zgyro);
12328        __tmp.put_i16_le(self.xmag);
12329        __tmp.put_i16_le(self.ymag);
12330        __tmp.put_i16_le(self.zmag);
12331        __tmp.put_i16_le(self.temperature);
12332        if matches!(version, MavlinkVersion::V2) {
12333            let len = __tmp.len();
12334            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12335        } else {
12336            __tmp.len()
12337        }
12338    }
12339}
12340#[doc = "id: 340"]
12341#[doc = "The global position resulting from GPS and sensor fusion."]
12342#[derive(Debug, Clone, PartialEq)]
12343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12345pub struct UTM_GLOBAL_POSITION_DATA {
12346    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
12347    pub time: u64,
12348    #[doc = "Latitude (WGS84)"]
12349    pub lat: i32,
12350    #[doc = "Longitude (WGS84)"]
12351    pub lon: i32,
12352    #[doc = "Altitude (WGS84)"]
12353    pub alt: i32,
12354    #[doc = "Altitude above ground"]
12355    pub relative_alt: i32,
12356    #[doc = "Next waypoint, latitude (WGS84)"]
12357    pub next_lat: i32,
12358    #[doc = "Next waypoint, longitude (WGS84)"]
12359    pub next_lon: i32,
12360    #[doc = "Next waypoint, altitude (WGS84)"]
12361    pub next_alt: i32,
12362    #[doc = "Ground X speed (latitude, positive north)"]
12363    pub vx: i16,
12364    #[doc = "Ground Y speed (longitude, positive east)"]
12365    pub vy: i16,
12366    #[doc = "Ground Z speed (altitude, positive down)"]
12367    pub vz: i16,
12368    #[doc = "Horizontal position uncertainty (standard deviation)"]
12369    pub h_acc: u16,
12370    #[doc = "Altitude uncertainty (standard deviation)"]
12371    pub v_acc: u16,
12372    #[doc = "Speed uncertainty (standard deviation)"]
12373    pub vel_acc: u16,
12374    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
12375    pub update_rate: u16,
12376    #[doc = "Unique UAS ID."]
12377    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12378    pub uas_id: [u8; 18],
12379    #[doc = "Flight state"]
12380    pub flight_state: UtmFlightState,
12381    #[doc = "Bitwise OR combination of the data available flags."]
12382    pub flags: UtmDataAvailFlags,
12383}
12384impl UTM_GLOBAL_POSITION_DATA {
12385    pub const ENCODED_LEN: usize = 70usize;
12386    pub const DEFAULT: Self = Self {
12387        time: 0_u64,
12388        lat: 0_i32,
12389        lon: 0_i32,
12390        alt: 0_i32,
12391        relative_alt: 0_i32,
12392        next_lat: 0_i32,
12393        next_lon: 0_i32,
12394        next_alt: 0_i32,
12395        vx: 0_i16,
12396        vy: 0_i16,
12397        vz: 0_i16,
12398        h_acc: 0_u16,
12399        v_acc: 0_u16,
12400        vel_acc: 0_u16,
12401        update_rate: 0_u16,
12402        uas_id: [0_u8; 18usize],
12403        flight_state: UtmFlightState::DEFAULT,
12404        flags: UtmDataAvailFlags::DEFAULT,
12405    };
12406    #[cfg(feature = "arbitrary")]
12407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12408        use arbitrary::{Arbitrary, Unstructured};
12409        let mut buf = [0u8; 1024];
12410        rng.fill_bytes(&mut buf);
12411        let mut unstructured = Unstructured::new(&buf);
12412        Self::arbitrary(&mut unstructured).unwrap_or_default()
12413    }
12414}
12415impl Default for UTM_GLOBAL_POSITION_DATA {
12416    fn default() -> Self {
12417        Self::DEFAULT.clone()
12418    }
12419}
12420impl MessageData for UTM_GLOBAL_POSITION_DATA {
12421    type Message = MavMessage;
12422    const ID: u32 = 340u32;
12423    const NAME: &'static str = "UTM_GLOBAL_POSITION";
12424    const EXTRA_CRC: u8 = 99u8;
12425    const ENCODED_LEN: usize = 70usize;
12426    fn deser(
12427        _version: MavlinkVersion,
12428        __input: &[u8],
12429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12430        let avail_len = __input.len();
12431        let mut payload_buf = [0; Self::ENCODED_LEN];
12432        let mut buf = if avail_len < Self::ENCODED_LEN {
12433            payload_buf[0..avail_len].copy_from_slice(__input);
12434            Bytes::new(&payload_buf)
12435        } else {
12436            Bytes::new(__input)
12437        };
12438        let mut __struct = Self::default();
12439        __struct.time = buf.get_u64_le();
12440        __struct.lat = buf.get_i32_le();
12441        __struct.lon = buf.get_i32_le();
12442        __struct.alt = buf.get_i32_le();
12443        __struct.relative_alt = buf.get_i32_le();
12444        __struct.next_lat = buf.get_i32_le();
12445        __struct.next_lon = buf.get_i32_le();
12446        __struct.next_alt = buf.get_i32_le();
12447        __struct.vx = buf.get_i16_le();
12448        __struct.vy = buf.get_i16_le();
12449        __struct.vz = buf.get_i16_le();
12450        __struct.h_acc = buf.get_u16_le();
12451        __struct.v_acc = buf.get_u16_le();
12452        __struct.vel_acc = buf.get_u16_le();
12453        __struct.update_rate = buf.get_u16_le();
12454        for v in &mut __struct.uas_id {
12455            let val = buf.get_u8();
12456            *v = val;
12457        }
12458        let tmp = buf.get_u8();
12459        __struct.flight_state =
12460            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12461                enum_type: "UtmFlightState",
12462                value: tmp as u32,
12463            })?;
12464        let tmp = buf.get_u8();
12465        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
12466            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12467                flag_type: "UtmDataAvailFlags",
12468                value: tmp as u32,
12469            })?;
12470        Ok(__struct)
12471    }
12472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12473        let mut __tmp = BytesMut::new(bytes);
12474        #[allow(clippy::absurd_extreme_comparisons)]
12475        #[allow(unused_comparisons)]
12476        if __tmp.remaining() < Self::ENCODED_LEN {
12477            panic!(
12478                "buffer is too small (need {} bytes, but got {})",
12479                Self::ENCODED_LEN,
12480                __tmp.remaining(),
12481            )
12482        }
12483        __tmp.put_u64_le(self.time);
12484        __tmp.put_i32_le(self.lat);
12485        __tmp.put_i32_le(self.lon);
12486        __tmp.put_i32_le(self.alt);
12487        __tmp.put_i32_le(self.relative_alt);
12488        __tmp.put_i32_le(self.next_lat);
12489        __tmp.put_i32_le(self.next_lon);
12490        __tmp.put_i32_le(self.next_alt);
12491        __tmp.put_i16_le(self.vx);
12492        __tmp.put_i16_le(self.vy);
12493        __tmp.put_i16_le(self.vz);
12494        __tmp.put_u16_le(self.h_acc);
12495        __tmp.put_u16_le(self.v_acc);
12496        __tmp.put_u16_le(self.vel_acc);
12497        __tmp.put_u16_le(self.update_rate);
12498        for val in &self.uas_id {
12499            __tmp.put_u8(*val);
12500        }
12501        __tmp.put_u8(self.flight_state as u8);
12502        __tmp.put_u8(self.flags.bits());
12503        if matches!(version, MavlinkVersion::V2) {
12504            let len = __tmp.len();
12505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12506        } else {
12507            __tmp.len()
12508        }
12509    }
12510}
12511#[doc = "id: 108"]
12512#[doc = "Status of simulation environment, if used."]
12513#[derive(Debug, Clone, PartialEq)]
12514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12516pub struct SIM_STATE_DATA {
12517    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
12518    pub q1: f32,
12519    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
12520    pub q2: f32,
12521    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
12522    pub q3: f32,
12523    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
12524    pub q4: f32,
12525    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
12526    pub roll: f32,
12527    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
12528    pub pitch: f32,
12529    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
12530    pub yaw: f32,
12531    #[doc = "X acceleration"]
12532    pub xacc: f32,
12533    #[doc = "Y acceleration"]
12534    pub yacc: f32,
12535    #[doc = "Z acceleration"]
12536    pub zacc: f32,
12537    #[doc = "Angular speed around X axis"]
12538    pub xgyro: f32,
12539    #[doc = "Angular speed around Y axis"]
12540    pub ygyro: f32,
12541    #[doc = "Angular speed around Z axis"]
12542    pub zgyro: f32,
12543    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
12544    pub lat: f32,
12545    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
12546    pub lon: f32,
12547    #[doc = "Altitude"]
12548    pub alt: f32,
12549    #[doc = "Horizontal position standard deviation"]
12550    pub std_dev_horz: f32,
12551    #[doc = "Vertical position standard deviation"]
12552    pub std_dev_vert: f32,
12553    #[doc = "True velocity in north direction in earth-fixed NED frame"]
12554    pub vn: f32,
12555    #[doc = "True velocity in east direction in earth-fixed NED frame"]
12556    pub ve: f32,
12557    #[doc = "True velocity in down direction in earth-fixed NED frame"]
12558    pub vd: f32,
12559    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
12560    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12561    pub lat_int: i32,
12562    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
12563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12564    pub lon_int: i32,
12565}
12566impl SIM_STATE_DATA {
12567    pub const ENCODED_LEN: usize = 92usize;
12568    pub const DEFAULT: Self = Self {
12569        q1: 0.0_f32,
12570        q2: 0.0_f32,
12571        q3: 0.0_f32,
12572        q4: 0.0_f32,
12573        roll: 0.0_f32,
12574        pitch: 0.0_f32,
12575        yaw: 0.0_f32,
12576        xacc: 0.0_f32,
12577        yacc: 0.0_f32,
12578        zacc: 0.0_f32,
12579        xgyro: 0.0_f32,
12580        ygyro: 0.0_f32,
12581        zgyro: 0.0_f32,
12582        lat: 0.0_f32,
12583        lon: 0.0_f32,
12584        alt: 0.0_f32,
12585        std_dev_horz: 0.0_f32,
12586        std_dev_vert: 0.0_f32,
12587        vn: 0.0_f32,
12588        ve: 0.0_f32,
12589        vd: 0.0_f32,
12590        lat_int: 0_i32,
12591        lon_int: 0_i32,
12592    };
12593    #[cfg(feature = "arbitrary")]
12594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12595        use arbitrary::{Arbitrary, Unstructured};
12596        let mut buf = [0u8; 1024];
12597        rng.fill_bytes(&mut buf);
12598        let mut unstructured = Unstructured::new(&buf);
12599        Self::arbitrary(&mut unstructured).unwrap_or_default()
12600    }
12601}
12602impl Default for SIM_STATE_DATA {
12603    fn default() -> Self {
12604        Self::DEFAULT.clone()
12605    }
12606}
12607impl MessageData for SIM_STATE_DATA {
12608    type Message = MavMessage;
12609    const ID: u32 = 108u32;
12610    const NAME: &'static str = "SIM_STATE";
12611    const EXTRA_CRC: u8 = 32u8;
12612    const ENCODED_LEN: usize = 92usize;
12613    fn deser(
12614        _version: MavlinkVersion,
12615        __input: &[u8],
12616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12617        let avail_len = __input.len();
12618        let mut payload_buf = [0; Self::ENCODED_LEN];
12619        let mut buf = if avail_len < Self::ENCODED_LEN {
12620            payload_buf[0..avail_len].copy_from_slice(__input);
12621            Bytes::new(&payload_buf)
12622        } else {
12623            Bytes::new(__input)
12624        };
12625        let mut __struct = Self::default();
12626        __struct.q1 = buf.get_f32_le();
12627        __struct.q2 = buf.get_f32_le();
12628        __struct.q3 = buf.get_f32_le();
12629        __struct.q4 = buf.get_f32_le();
12630        __struct.roll = buf.get_f32_le();
12631        __struct.pitch = buf.get_f32_le();
12632        __struct.yaw = buf.get_f32_le();
12633        __struct.xacc = buf.get_f32_le();
12634        __struct.yacc = buf.get_f32_le();
12635        __struct.zacc = buf.get_f32_le();
12636        __struct.xgyro = buf.get_f32_le();
12637        __struct.ygyro = buf.get_f32_le();
12638        __struct.zgyro = buf.get_f32_le();
12639        __struct.lat = buf.get_f32_le();
12640        __struct.lon = buf.get_f32_le();
12641        __struct.alt = buf.get_f32_le();
12642        __struct.std_dev_horz = buf.get_f32_le();
12643        __struct.std_dev_vert = buf.get_f32_le();
12644        __struct.vn = buf.get_f32_le();
12645        __struct.ve = buf.get_f32_le();
12646        __struct.vd = buf.get_f32_le();
12647        __struct.lat_int = buf.get_i32_le();
12648        __struct.lon_int = buf.get_i32_le();
12649        Ok(__struct)
12650    }
12651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12652        let mut __tmp = BytesMut::new(bytes);
12653        #[allow(clippy::absurd_extreme_comparisons)]
12654        #[allow(unused_comparisons)]
12655        if __tmp.remaining() < Self::ENCODED_LEN {
12656            panic!(
12657                "buffer is too small (need {} bytes, but got {})",
12658                Self::ENCODED_LEN,
12659                __tmp.remaining(),
12660            )
12661        }
12662        __tmp.put_f32_le(self.q1);
12663        __tmp.put_f32_le(self.q2);
12664        __tmp.put_f32_le(self.q3);
12665        __tmp.put_f32_le(self.q4);
12666        __tmp.put_f32_le(self.roll);
12667        __tmp.put_f32_le(self.pitch);
12668        __tmp.put_f32_le(self.yaw);
12669        __tmp.put_f32_le(self.xacc);
12670        __tmp.put_f32_le(self.yacc);
12671        __tmp.put_f32_le(self.zacc);
12672        __tmp.put_f32_le(self.xgyro);
12673        __tmp.put_f32_le(self.ygyro);
12674        __tmp.put_f32_le(self.zgyro);
12675        __tmp.put_f32_le(self.lat);
12676        __tmp.put_f32_le(self.lon);
12677        __tmp.put_f32_le(self.alt);
12678        __tmp.put_f32_le(self.std_dev_horz);
12679        __tmp.put_f32_le(self.std_dev_vert);
12680        __tmp.put_f32_le(self.vn);
12681        __tmp.put_f32_le(self.ve);
12682        __tmp.put_f32_le(self.vd);
12683        __tmp.put_i32_le(self.lat_int);
12684        __tmp.put_i32_le(self.lon_int);
12685        if matches!(version, MavlinkVersion::V2) {
12686            let len = __tmp.len();
12687            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12688        } else {
12689            __tmp.len()
12690        }
12691    }
12692}
12693#[doc = "id: 55"]
12694#[doc = "Read out the safety zone the MAV currently assumes."]
12695#[derive(Debug, Clone, PartialEq)]
12696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12698pub struct SAFETY_ALLOWED_AREA_DATA {
12699    #[doc = "x position 1 / Latitude 1"]
12700    pub p1x: f32,
12701    #[doc = "y position 1 / Longitude 1"]
12702    pub p1y: f32,
12703    #[doc = "z position 1 / Altitude 1"]
12704    pub p1z: f32,
12705    #[doc = "x position 2 / Latitude 2"]
12706    pub p2x: f32,
12707    #[doc = "y position 2 / Longitude 2"]
12708    pub p2y: f32,
12709    #[doc = "z position 2 / Altitude 2"]
12710    pub p2z: f32,
12711    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
12712    pub frame: MavFrame,
12713}
12714impl SAFETY_ALLOWED_AREA_DATA {
12715    pub const ENCODED_LEN: usize = 25usize;
12716    pub const DEFAULT: Self = Self {
12717        p1x: 0.0_f32,
12718        p1y: 0.0_f32,
12719        p1z: 0.0_f32,
12720        p2x: 0.0_f32,
12721        p2y: 0.0_f32,
12722        p2z: 0.0_f32,
12723        frame: MavFrame::DEFAULT,
12724    };
12725    #[cfg(feature = "arbitrary")]
12726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12727        use arbitrary::{Arbitrary, Unstructured};
12728        let mut buf = [0u8; 1024];
12729        rng.fill_bytes(&mut buf);
12730        let mut unstructured = Unstructured::new(&buf);
12731        Self::arbitrary(&mut unstructured).unwrap_or_default()
12732    }
12733}
12734impl Default for SAFETY_ALLOWED_AREA_DATA {
12735    fn default() -> Self {
12736        Self::DEFAULT.clone()
12737    }
12738}
12739impl MessageData for SAFETY_ALLOWED_AREA_DATA {
12740    type Message = MavMessage;
12741    const ID: u32 = 55u32;
12742    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
12743    const EXTRA_CRC: u8 = 3u8;
12744    const ENCODED_LEN: usize = 25usize;
12745    fn deser(
12746        _version: MavlinkVersion,
12747        __input: &[u8],
12748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12749        let avail_len = __input.len();
12750        let mut payload_buf = [0; Self::ENCODED_LEN];
12751        let mut buf = if avail_len < Self::ENCODED_LEN {
12752            payload_buf[0..avail_len].copy_from_slice(__input);
12753            Bytes::new(&payload_buf)
12754        } else {
12755            Bytes::new(__input)
12756        };
12757        let mut __struct = Self::default();
12758        __struct.p1x = buf.get_f32_le();
12759        __struct.p1y = buf.get_f32_le();
12760        __struct.p1z = buf.get_f32_le();
12761        __struct.p2x = buf.get_f32_le();
12762        __struct.p2y = buf.get_f32_le();
12763        __struct.p2z = buf.get_f32_le();
12764        let tmp = buf.get_u8();
12765        __struct.frame =
12766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12767                enum_type: "MavFrame",
12768                value: tmp as u32,
12769            })?;
12770        Ok(__struct)
12771    }
12772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12773        let mut __tmp = BytesMut::new(bytes);
12774        #[allow(clippy::absurd_extreme_comparisons)]
12775        #[allow(unused_comparisons)]
12776        if __tmp.remaining() < Self::ENCODED_LEN {
12777            panic!(
12778                "buffer is too small (need {} bytes, but got {})",
12779                Self::ENCODED_LEN,
12780                __tmp.remaining(),
12781            )
12782        }
12783        __tmp.put_f32_le(self.p1x);
12784        __tmp.put_f32_le(self.p1y);
12785        __tmp.put_f32_le(self.p1z);
12786        __tmp.put_f32_le(self.p2x);
12787        __tmp.put_f32_le(self.p2y);
12788        __tmp.put_f32_le(self.p2z);
12789        __tmp.put_u8(self.frame as u8);
12790        if matches!(version, MavlinkVersion::V2) {
12791            let len = __tmp.len();
12792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12793        } else {
12794            __tmp.len()
12795        }
12796    }
12797}
12798#[doc = "id: 43"]
12799#[doc = "Request the overall list of mission items from the system/component."]
12800#[derive(Debug, Clone, PartialEq)]
12801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12803pub struct MISSION_REQUEST_LIST_DATA {
12804    #[doc = "System ID"]
12805    pub target_system: u8,
12806    #[doc = "Component ID"]
12807    pub target_component: u8,
12808    #[doc = "Mission type."]
12809    #[cfg_attr(feature = "serde", serde(default))]
12810    pub mission_type: MavMissionType,
12811}
12812impl MISSION_REQUEST_LIST_DATA {
12813    pub const ENCODED_LEN: usize = 3usize;
12814    pub const DEFAULT: Self = Self {
12815        target_system: 0_u8,
12816        target_component: 0_u8,
12817        mission_type: MavMissionType::DEFAULT,
12818    };
12819    #[cfg(feature = "arbitrary")]
12820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12821        use arbitrary::{Arbitrary, Unstructured};
12822        let mut buf = [0u8; 1024];
12823        rng.fill_bytes(&mut buf);
12824        let mut unstructured = Unstructured::new(&buf);
12825        Self::arbitrary(&mut unstructured).unwrap_or_default()
12826    }
12827}
12828impl Default for MISSION_REQUEST_LIST_DATA {
12829    fn default() -> Self {
12830        Self::DEFAULT.clone()
12831    }
12832}
12833impl MessageData for MISSION_REQUEST_LIST_DATA {
12834    type Message = MavMessage;
12835    const ID: u32 = 43u32;
12836    const NAME: &'static str = "MISSION_REQUEST_LIST";
12837    const EXTRA_CRC: u8 = 132u8;
12838    const ENCODED_LEN: usize = 3usize;
12839    fn deser(
12840        _version: MavlinkVersion,
12841        __input: &[u8],
12842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12843        let avail_len = __input.len();
12844        let mut payload_buf = [0; Self::ENCODED_LEN];
12845        let mut buf = if avail_len < Self::ENCODED_LEN {
12846            payload_buf[0..avail_len].copy_from_slice(__input);
12847            Bytes::new(&payload_buf)
12848        } else {
12849            Bytes::new(__input)
12850        };
12851        let mut __struct = Self::default();
12852        __struct.target_system = buf.get_u8();
12853        __struct.target_component = buf.get_u8();
12854        let tmp = buf.get_u8();
12855        __struct.mission_type =
12856            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12857                enum_type: "MavMissionType",
12858                value: tmp as u32,
12859            })?;
12860        Ok(__struct)
12861    }
12862    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12863        let mut __tmp = BytesMut::new(bytes);
12864        #[allow(clippy::absurd_extreme_comparisons)]
12865        #[allow(unused_comparisons)]
12866        if __tmp.remaining() < Self::ENCODED_LEN {
12867            panic!(
12868                "buffer is too small (need {} bytes, but got {})",
12869                Self::ENCODED_LEN,
12870                __tmp.remaining(),
12871            )
12872        }
12873        __tmp.put_u8(self.target_system);
12874        __tmp.put_u8(self.target_component);
12875        __tmp.put_u8(self.mission_type as u8);
12876        if matches!(version, MavlinkVersion::V2) {
12877            let len = __tmp.len();
12878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12879        } else {
12880            __tmp.len()
12881        }
12882    }
12883}
12884#[doc = "id: 288"]
12885#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12886#[derive(Debug, Clone, PartialEq)]
12887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12889pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12890    #[doc = "High level gimbal manager flags."]
12891    pub flags: GimbalManagerFlags,
12892    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12893    pub pitch: f32,
12894    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12895    pub yaw: f32,
12896    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12897    pub pitch_rate: f32,
12898    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12899    pub yaw_rate: f32,
12900    #[doc = "System ID"]
12901    pub target_system: u8,
12902    #[doc = "Component ID"]
12903    pub target_component: u8,
12904    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12905    pub gimbal_device_id: u8,
12906}
12907impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12908    pub const ENCODED_LEN: usize = 23usize;
12909    pub const DEFAULT: Self = Self {
12910        flags: GimbalManagerFlags::DEFAULT,
12911        pitch: 0.0_f32,
12912        yaw: 0.0_f32,
12913        pitch_rate: 0.0_f32,
12914        yaw_rate: 0.0_f32,
12915        target_system: 0_u8,
12916        target_component: 0_u8,
12917        gimbal_device_id: 0_u8,
12918    };
12919    #[cfg(feature = "arbitrary")]
12920    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12921        use arbitrary::{Arbitrary, Unstructured};
12922        let mut buf = [0u8; 1024];
12923        rng.fill_bytes(&mut buf);
12924        let mut unstructured = Unstructured::new(&buf);
12925        Self::arbitrary(&mut unstructured).unwrap_or_default()
12926    }
12927}
12928impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12929    fn default() -> Self {
12930        Self::DEFAULT.clone()
12931    }
12932}
12933impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12934    type Message = MavMessage;
12935    const ID: u32 = 288u32;
12936    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12937    const EXTRA_CRC: u8 = 20u8;
12938    const ENCODED_LEN: usize = 23usize;
12939    fn deser(
12940        _version: MavlinkVersion,
12941        __input: &[u8],
12942    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12943        let avail_len = __input.len();
12944        let mut payload_buf = [0; Self::ENCODED_LEN];
12945        let mut buf = if avail_len < Self::ENCODED_LEN {
12946            payload_buf[0..avail_len].copy_from_slice(__input);
12947            Bytes::new(&payload_buf)
12948        } else {
12949            Bytes::new(__input)
12950        };
12951        let mut __struct = Self::default();
12952        let tmp = buf.get_u32_le();
12953        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12954            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12955                flag_type: "GimbalManagerFlags",
12956                value: tmp as u32,
12957            })?;
12958        __struct.pitch = buf.get_f32_le();
12959        __struct.yaw = buf.get_f32_le();
12960        __struct.pitch_rate = buf.get_f32_le();
12961        __struct.yaw_rate = buf.get_f32_le();
12962        __struct.target_system = buf.get_u8();
12963        __struct.target_component = buf.get_u8();
12964        __struct.gimbal_device_id = buf.get_u8();
12965        Ok(__struct)
12966    }
12967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12968        let mut __tmp = BytesMut::new(bytes);
12969        #[allow(clippy::absurd_extreme_comparisons)]
12970        #[allow(unused_comparisons)]
12971        if __tmp.remaining() < Self::ENCODED_LEN {
12972            panic!(
12973                "buffer is too small (need {} bytes, but got {})",
12974                Self::ENCODED_LEN,
12975                __tmp.remaining(),
12976            )
12977        }
12978        __tmp.put_u32_le(self.flags.bits());
12979        __tmp.put_f32_le(self.pitch);
12980        __tmp.put_f32_le(self.yaw);
12981        __tmp.put_f32_le(self.pitch_rate);
12982        __tmp.put_f32_le(self.yaw_rate);
12983        __tmp.put_u8(self.target_system);
12984        __tmp.put_u8(self.target_component);
12985        __tmp.put_u8(self.gimbal_device_id);
12986        if matches!(version, MavlinkVersion::V2) {
12987            let len = __tmp.len();
12988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12989        } else {
12990            __tmp.len()
12991        }
12992    }
12993}
12994#[doc = "id: 31"]
12995#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
12996#[derive(Debug, Clone, PartialEq)]
12997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12999pub struct ATTITUDE_QUATERNION_DATA {
13000    #[doc = "Timestamp (time since system boot)."]
13001    pub time_boot_ms: u32,
13002    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
13003    pub q1: f32,
13004    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
13005    pub q2: f32,
13006    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
13007    pub q3: f32,
13008    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
13009    pub q4: f32,
13010    #[doc = "Roll angular speed"]
13011    pub rollspeed: f32,
13012    #[doc = "Pitch angular speed"]
13013    pub pitchspeed: f32,
13014    #[doc = "Yaw angular speed"]
13015    pub yawspeed: f32,
13016    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
13017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13019    pub repr_offset_q: [f32; 4],
13020}
13021impl ATTITUDE_QUATERNION_DATA {
13022    pub const ENCODED_LEN: usize = 48usize;
13023    pub const DEFAULT: Self = Self {
13024        time_boot_ms: 0_u32,
13025        q1: 0.0_f32,
13026        q2: 0.0_f32,
13027        q3: 0.0_f32,
13028        q4: 0.0_f32,
13029        rollspeed: 0.0_f32,
13030        pitchspeed: 0.0_f32,
13031        yawspeed: 0.0_f32,
13032        repr_offset_q: [0.0_f32; 4usize],
13033    };
13034    #[cfg(feature = "arbitrary")]
13035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13036        use arbitrary::{Arbitrary, Unstructured};
13037        let mut buf = [0u8; 1024];
13038        rng.fill_bytes(&mut buf);
13039        let mut unstructured = Unstructured::new(&buf);
13040        Self::arbitrary(&mut unstructured).unwrap_or_default()
13041    }
13042}
13043impl Default for ATTITUDE_QUATERNION_DATA {
13044    fn default() -> Self {
13045        Self::DEFAULT.clone()
13046    }
13047}
13048impl MessageData for ATTITUDE_QUATERNION_DATA {
13049    type Message = MavMessage;
13050    const ID: u32 = 31u32;
13051    const NAME: &'static str = "ATTITUDE_QUATERNION";
13052    const EXTRA_CRC: u8 = 246u8;
13053    const ENCODED_LEN: usize = 48usize;
13054    fn deser(
13055        _version: MavlinkVersion,
13056        __input: &[u8],
13057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13058        let avail_len = __input.len();
13059        let mut payload_buf = [0; Self::ENCODED_LEN];
13060        let mut buf = if avail_len < Self::ENCODED_LEN {
13061            payload_buf[0..avail_len].copy_from_slice(__input);
13062            Bytes::new(&payload_buf)
13063        } else {
13064            Bytes::new(__input)
13065        };
13066        let mut __struct = Self::default();
13067        __struct.time_boot_ms = buf.get_u32_le();
13068        __struct.q1 = buf.get_f32_le();
13069        __struct.q2 = buf.get_f32_le();
13070        __struct.q3 = buf.get_f32_le();
13071        __struct.q4 = buf.get_f32_le();
13072        __struct.rollspeed = buf.get_f32_le();
13073        __struct.pitchspeed = buf.get_f32_le();
13074        __struct.yawspeed = buf.get_f32_le();
13075        for v in &mut __struct.repr_offset_q {
13076            let val = buf.get_f32_le();
13077            *v = val;
13078        }
13079        Ok(__struct)
13080    }
13081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13082        let mut __tmp = BytesMut::new(bytes);
13083        #[allow(clippy::absurd_extreme_comparisons)]
13084        #[allow(unused_comparisons)]
13085        if __tmp.remaining() < Self::ENCODED_LEN {
13086            panic!(
13087                "buffer is too small (need {} bytes, but got {})",
13088                Self::ENCODED_LEN,
13089                __tmp.remaining(),
13090            )
13091        }
13092        __tmp.put_u32_le(self.time_boot_ms);
13093        __tmp.put_f32_le(self.q1);
13094        __tmp.put_f32_le(self.q2);
13095        __tmp.put_f32_le(self.q3);
13096        __tmp.put_f32_le(self.q4);
13097        __tmp.put_f32_le(self.rollspeed);
13098        __tmp.put_f32_le(self.pitchspeed);
13099        __tmp.put_f32_le(self.yawspeed);
13100        for val in &self.repr_offset_q {
13101            __tmp.put_f32_le(*val);
13102        }
13103        if matches!(version, MavlinkVersion::V2) {
13104            let len = __tmp.len();
13105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13106        } else {
13107            __tmp.len()
13108        }
13109    }
13110}
13111#[doc = "id: 397"]
13112#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
13113#[derive(Debug, Clone, PartialEq)]
13114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13116pub struct COMPONENT_METADATA_DATA {
13117    #[doc = "Timestamp (time since system boot)."]
13118    pub time_boot_ms: u32,
13119    #[doc = "CRC32 of the general metadata file."]
13120    pub file_crc: u32,
13121    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
13122    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13123    pub uri: [u8; 100],
13124}
13125impl COMPONENT_METADATA_DATA {
13126    pub const ENCODED_LEN: usize = 108usize;
13127    pub const DEFAULT: Self = Self {
13128        time_boot_ms: 0_u32,
13129        file_crc: 0_u32,
13130        uri: [0_u8; 100usize],
13131    };
13132    #[cfg(feature = "arbitrary")]
13133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13134        use arbitrary::{Arbitrary, Unstructured};
13135        let mut buf = [0u8; 1024];
13136        rng.fill_bytes(&mut buf);
13137        let mut unstructured = Unstructured::new(&buf);
13138        Self::arbitrary(&mut unstructured).unwrap_or_default()
13139    }
13140}
13141impl Default for COMPONENT_METADATA_DATA {
13142    fn default() -> Self {
13143        Self::DEFAULT.clone()
13144    }
13145}
13146impl MessageData for COMPONENT_METADATA_DATA {
13147    type Message = MavMessage;
13148    const ID: u32 = 397u32;
13149    const NAME: &'static str = "COMPONENT_METADATA";
13150    const EXTRA_CRC: u8 = 182u8;
13151    const ENCODED_LEN: usize = 108usize;
13152    fn deser(
13153        _version: MavlinkVersion,
13154        __input: &[u8],
13155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13156        let avail_len = __input.len();
13157        let mut payload_buf = [0; Self::ENCODED_LEN];
13158        let mut buf = if avail_len < Self::ENCODED_LEN {
13159            payload_buf[0..avail_len].copy_from_slice(__input);
13160            Bytes::new(&payload_buf)
13161        } else {
13162            Bytes::new(__input)
13163        };
13164        let mut __struct = Self::default();
13165        __struct.time_boot_ms = buf.get_u32_le();
13166        __struct.file_crc = buf.get_u32_le();
13167        for v in &mut __struct.uri {
13168            let val = buf.get_u8();
13169            *v = val;
13170        }
13171        Ok(__struct)
13172    }
13173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13174        let mut __tmp = BytesMut::new(bytes);
13175        #[allow(clippy::absurd_extreme_comparisons)]
13176        #[allow(unused_comparisons)]
13177        if __tmp.remaining() < Self::ENCODED_LEN {
13178            panic!(
13179                "buffer is too small (need {} bytes, but got {})",
13180                Self::ENCODED_LEN,
13181                __tmp.remaining(),
13182            )
13183        }
13184        __tmp.put_u32_le(self.time_boot_ms);
13185        __tmp.put_u32_le(self.file_crc);
13186        for val in &self.uri {
13187            __tmp.put_u8(*val);
13188        }
13189        if matches!(version, MavlinkVersion::V2) {
13190            let len = __tmp.len();
13191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13192        } else {
13193            __tmp.len()
13194        }
13195    }
13196}
13197#[doc = "id: 21"]
13198#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
13199#[derive(Debug, Clone, PartialEq)]
13200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13202pub struct PARAM_REQUEST_LIST_DATA {
13203    #[doc = "System ID"]
13204    pub target_system: u8,
13205    #[doc = "Component ID"]
13206    pub target_component: u8,
13207}
13208impl PARAM_REQUEST_LIST_DATA {
13209    pub const ENCODED_LEN: usize = 2usize;
13210    pub const DEFAULT: Self = Self {
13211        target_system: 0_u8,
13212        target_component: 0_u8,
13213    };
13214    #[cfg(feature = "arbitrary")]
13215    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13216        use arbitrary::{Arbitrary, Unstructured};
13217        let mut buf = [0u8; 1024];
13218        rng.fill_bytes(&mut buf);
13219        let mut unstructured = Unstructured::new(&buf);
13220        Self::arbitrary(&mut unstructured).unwrap_or_default()
13221    }
13222}
13223impl Default for PARAM_REQUEST_LIST_DATA {
13224    fn default() -> Self {
13225        Self::DEFAULT.clone()
13226    }
13227}
13228impl MessageData for PARAM_REQUEST_LIST_DATA {
13229    type Message = MavMessage;
13230    const ID: u32 = 21u32;
13231    const NAME: &'static str = "PARAM_REQUEST_LIST";
13232    const EXTRA_CRC: u8 = 159u8;
13233    const ENCODED_LEN: usize = 2usize;
13234    fn deser(
13235        _version: MavlinkVersion,
13236        __input: &[u8],
13237    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13238        let avail_len = __input.len();
13239        let mut payload_buf = [0; Self::ENCODED_LEN];
13240        let mut buf = if avail_len < Self::ENCODED_LEN {
13241            payload_buf[0..avail_len].copy_from_slice(__input);
13242            Bytes::new(&payload_buf)
13243        } else {
13244            Bytes::new(__input)
13245        };
13246        let mut __struct = Self::default();
13247        __struct.target_system = buf.get_u8();
13248        __struct.target_component = buf.get_u8();
13249        Ok(__struct)
13250    }
13251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13252        let mut __tmp = BytesMut::new(bytes);
13253        #[allow(clippy::absurd_extreme_comparisons)]
13254        #[allow(unused_comparisons)]
13255        if __tmp.remaining() < Self::ENCODED_LEN {
13256            panic!(
13257                "buffer is too small (need {} bytes, but got {})",
13258                Self::ENCODED_LEN,
13259                __tmp.remaining(),
13260            )
13261        }
13262        __tmp.put_u8(self.target_system);
13263        __tmp.put_u8(self.target_component);
13264        if matches!(version, MavlinkVersion::V2) {
13265            let len = __tmp.len();
13266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13267        } else {
13268            __tmp.len()
13269        }
13270    }
13271}
13272#[doc = "id: 91"]
13273#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
13274#[derive(Debug, Clone, PartialEq)]
13275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13277pub struct HIL_CONTROLS_DATA {
13278    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13279    pub time_usec: u64,
13280    #[doc = "Control output -1 .. 1"]
13281    pub roll_ailerons: f32,
13282    #[doc = "Control output -1 .. 1"]
13283    pub pitch_elevator: f32,
13284    #[doc = "Control output -1 .. 1"]
13285    pub yaw_rudder: f32,
13286    #[doc = "Throttle 0 .. 1"]
13287    pub throttle: f32,
13288    #[doc = "Aux 1, -1 .. 1"]
13289    pub aux1: f32,
13290    #[doc = "Aux 2, -1 .. 1"]
13291    pub aux2: f32,
13292    #[doc = "Aux 3, -1 .. 1"]
13293    pub aux3: f32,
13294    #[doc = "Aux 4, -1 .. 1"]
13295    pub aux4: f32,
13296    #[doc = "System mode."]
13297    pub mode: MavMode,
13298    #[doc = "Navigation mode (MAV_NAV_MODE)"]
13299    pub nav_mode: u8,
13300}
13301impl HIL_CONTROLS_DATA {
13302    pub const ENCODED_LEN: usize = 42usize;
13303    pub const DEFAULT: Self = Self {
13304        time_usec: 0_u64,
13305        roll_ailerons: 0.0_f32,
13306        pitch_elevator: 0.0_f32,
13307        yaw_rudder: 0.0_f32,
13308        throttle: 0.0_f32,
13309        aux1: 0.0_f32,
13310        aux2: 0.0_f32,
13311        aux3: 0.0_f32,
13312        aux4: 0.0_f32,
13313        mode: MavMode::DEFAULT,
13314        nav_mode: 0_u8,
13315    };
13316    #[cfg(feature = "arbitrary")]
13317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13318        use arbitrary::{Arbitrary, Unstructured};
13319        let mut buf = [0u8; 1024];
13320        rng.fill_bytes(&mut buf);
13321        let mut unstructured = Unstructured::new(&buf);
13322        Self::arbitrary(&mut unstructured).unwrap_or_default()
13323    }
13324}
13325impl Default for HIL_CONTROLS_DATA {
13326    fn default() -> Self {
13327        Self::DEFAULT.clone()
13328    }
13329}
13330impl MessageData for HIL_CONTROLS_DATA {
13331    type Message = MavMessage;
13332    const ID: u32 = 91u32;
13333    const NAME: &'static str = "HIL_CONTROLS";
13334    const EXTRA_CRC: u8 = 63u8;
13335    const ENCODED_LEN: usize = 42usize;
13336    fn deser(
13337        _version: MavlinkVersion,
13338        __input: &[u8],
13339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13340        let avail_len = __input.len();
13341        let mut payload_buf = [0; Self::ENCODED_LEN];
13342        let mut buf = if avail_len < Self::ENCODED_LEN {
13343            payload_buf[0..avail_len].copy_from_slice(__input);
13344            Bytes::new(&payload_buf)
13345        } else {
13346            Bytes::new(__input)
13347        };
13348        let mut __struct = Self::default();
13349        __struct.time_usec = buf.get_u64_le();
13350        __struct.roll_ailerons = buf.get_f32_le();
13351        __struct.pitch_elevator = buf.get_f32_le();
13352        __struct.yaw_rudder = buf.get_f32_le();
13353        __struct.throttle = buf.get_f32_le();
13354        __struct.aux1 = buf.get_f32_le();
13355        __struct.aux2 = buf.get_f32_le();
13356        __struct.aux3 = buf.get_f32_le();
13357        __struct.aux4 = buf.get_f32_le();
13358        let tmp = buf.get_u8();
13359        __struct.mode =
13360            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13361                enum_type: "MavMode",
13362                value: tmp as u32,
13363            })?;
13364        __struct.nav_mode = buf.get_u8();
13365        Ok(__struct)
13366    }
13367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13368        let mut __tmp = BytesMut::new(bytes);
13369        #[allow(clippy::absurd_extreme_comparisons)]
13370        #[allow(unused_comparisons)]
13371        if __tmp.remaining() < Self::ENCODED_LEN {
13372            panic!(
13373                "buffer is too small (need {} bytes, but got {})",
13374                Self::ENCODED_LEN,
13375                __tmp.remaining(),
13376            )
13377        }
13378        __tmp.put_u64_le(self.time_usec);
13379        __tmp.put_f32_le(self.roll_ailerons);
13380        __tmp.put_f32_le(self.pitch_elevator);
13381        __tmp.put_f32_le(self.yaw_rudder);
13382        __tmp.put_f32_le(self.throttle);
13383        __tmp.put_f32_le(self.aux1);
13384        __tmp.put_f32_le(self.aux2);
13385        __tmp.put_f32_le(self.aux3);
13386        __tmp.put_f32_le(self.aux4);
13387        __tmp.put_u8(self.mode as u8);
13388        __tmp.put_u8(self.nav_mode);
13389        if matches!(version, MavlinkVersion::V2) {
13390            let len = __tmp.len();
13391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13392        } else {
13393            __tmp.len()
13394        }
13395    }
13396}
13397#[doc = "id: 262"]
13398#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
13399#[derive(Debug, Clone, PartialEq)]
13400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13402pub struct CAMERA_CAPTURE_STATUS_DATA {
13403    #[doc = "Timestamp (time since system boot)."]
13404    pub time_boot_ms: u32,
13405    #[doc = "Image capture interval"]
13406    pub image_interval: f32,
13407    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
13408    pub recording_time_ms: u32,
13409    #[doc = "Available storage capacity."]
13410    pub available_capacity: f32,
13411    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
13412    pub image_status: u8,
13413    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
13414    pub video_status: u8,
13415    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
13416    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13417    pub image_count: i32,
13418    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
13419    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13420    pub camera_device_id: u8,
13421}
13422impl CAMERA_CAPTURE_STATUS_DATA {
13423    pub const ENCODED_LEN: usize = 23usize;
13424    pub const DEFAULT: Self = Self {
13425        time_boot_ms: 0_u32,
13426        image_interval: 0.0_f32,
13427        recording_time_ms: 0_u32,
13428        available_capacity: 0.0_f32,
13429        image_status: 0_u8,
13430        video_status: 0_u8,
13431        image_count: 0_i32,
13432        camera_device_id: 0_u8,
13433    };
13434    #[cfg(feature = "arbitrary")]
13435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13436        use arbitrary::{Arbitrary, Unstructured};
13437        let mut buf = [0u8; 1024];
13438        rng.fill_bytes(&mut buf);
13439        let mut unstructured = Unstructured::new(&buf);
13440        Self::arbitrary(&mut unstructured).unwrap_or_default()
13441    }
13442}
13443impl Default for CAMERA_CAPTURE_STATUS_DATA {
13444    fn default() -> Self {
13445        Self::DEFAULT.clone()
13446    }
13447}
13448impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
13449    type Message = MavMessage;
13450    const ID: u32 = 262u32;
13451    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
13452    const EXTRA_CRC: u8 = 12u8;
13453    const ENCODED_LEN: usize = 23usize;
13454    fn deser(
13455        _version: MavlinkVersion,
13456        __input: &[u8],
13457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13458        let avail_len = __input.len();
13459        let mut payload_buf = [0; Self::ENCODED_LEN];
13460        let mut buf = if avail_len < Self::ENCODED_LEN {
13461            payload_buf[0..avail_len].copy_from_slice(__input);
13462            Bytes::new(&payload_buf)
13463        } else {
13464            Bytes::new(__input)
13465        };
13466        let mut __struct = Self::default();
13467        __struct.time_boot_ms = buf.get_u32_le();
13468        __struct.image_interval = buf.get_f32_le();
13469        __struct.recording_time_ms = buf.get_u32_le();
13470        __struct.available_capacity = buf.get_f32_le();
13471        __struct.image_status = buf.get_u8();
13472        __struct.video_status = buf.get_u8();
13473        __struct.image_count = buf.get_i32_le();
13474        __struct.camera_device_id = buf.get_u8();
13475        Ok(__struct)
13476    }
13477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13478        let mut __tmp = BytesMut::new(bytes);
13479        #[allow(clippy::absurd_extreme_comparisons)]
13480        #[allow(unused_comparisons)]
13481        if __tmp.remaining() < Self::ENCODED_LEN {
13482            panic!(
13483                "buffer is too small (need {} bytes, but got {})",
13484                Self::ENCODED_LEN,
13485                __tmp.remaining(),
13486            )
13487        }
13488        __tmp.put_u32_le(self.time_boot_ms);
13489        __tmp.put_f32_le(self.image_interval);
13490        __tmp.put_u32_le(self.recording_time_ms);
13491        __tmp.put_f32_le(self.available_capacity);
13492        __tmp.put_u8(self.image_status);
13493        __tmp.put_u8(self.video_status);
13494        __tmp.put_i32_le(self.image_count);
13495        __tmp.put_u8(self.camera_device_id);
13496        if matches!(version, MavlinkVersion::V2) {
13497            let len = __tmp.len();
13498            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13499        } else {
13500            __tmp.len()
13501        }
13502    }
13503}
13504#[doc = "id: 320"]
13505#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
13506#[derive(Debug, Clone, PartialEq)]
13507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13509pub struct PARAM_EXT_REQUEST_READ_DATA {
13510    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
13511    pub param_index: i16,
13512    #[doc = "System ID"]
13513    pub target_system: u8,
13514    #[doc = "Component ID"]
13515    pub target_component: u8,
13516    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
13517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13518    pub param_id: [u8; 16],
13519}
13520impl PARAM_EXT_REQUEST_READ_DATA {
13521    pub const ENCODED_LEN: usize = 20usize;
13522    pub const DEFAULT: Self = Self {
13523        param_index: 0_i16,
13524        target_system: 0_u8,
13525        target_component: 0_u8,
13526        param_id: [0_u8; 16usize],
13527    };
13528    #[cfg(feature = "arbitrary")]
13529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13530        use arbitrary::{Arbitrary, Unstructured};
13531        let mut buf = [0u8; 1024];
13532        rng.fill_bytes(&mut buf);
13533        let mut unstructured = Unstructured::new(&buf);
13534        Self::arbitrary(&mut unstructured).unwrap_or_default()
13535    }
13536}
13537impl Default for PARAM_EXT_REQUEST_READ_DATA {
13538    fn default() -> Self {
13539        Self::DEFAULT.clone()
13540    }
13541}
13542impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
13543    type Message = MavMessage;
13544    const ID: u32 = 320u32;
13545    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
13546    const EXTRA_CRC: u8 = 243u8;
13547    const ENCODED_LEN: usize = 20usize;
13548    fn deser(
13549        _version: MavlinkVersion,
13550        __input: &[u8],
13551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13552        let avail_len = __input.len();
13553        let mut payload_buf = [0; Self::ENCODED_LEN];
13554        let mut buf = if avail_len < Self::ENCODED_LEN {
13555            payload_buf[0..avail_len].copy_from_slice(__input);
13556            Bytes::new(&payload_buf)
13557        } else {
13558            Bytes::new(__input)
13559        };
13560        let mut __struct = Self::default();
13561        __struct.param_index = buf.get_i16_le();
13562        __struct.target_system = buf.get_u8();
13563        __struct.target_component = buf.get_u8();
13564        for v in &mut __struct.param_id {
13565            let val = buf.get_u8();
13566            *v = val;
13567        }
13568        Ok(__struct)
13569    }
13570    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13571        let mut __tmp = BytesMut::new(bytes);
13572        #[allow(clippy::absurd_extreme_comparisons)]
13573        #[allow(unused_comparisons)]
13574        if __tmp.remaining() < Self::ENCODED_LEN {
13575            panic!(
13576                "buffer is too small (need {} bytes, but got {})",
13577                Self::ENCODED_LEN,
13578                __tmp.remaining(),
13579            )
13580        }
13581        __tmp.put_i16_le(self.param_index);
13582        __tmp.put_u8(self.target_system);
13583        __tmp.put_u8(self.target_component);
13584        for val in &self.param_id {
13585            __tmp.put_u8(*val);
13586        }
13587        if matches!(version, MavlinkVersion::V2) {
13588            let len = __tmp.len();
13589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13590        } else {
13591            __tmp.len()
13592        }
13593    }
13594}
13595#[doc = "id: 112"]
13596#[doc = "Camera-IMU triggering and synchronisation message."]
13597#[derive(Debug, Clone, PartialEq)]
13598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13600pub struct CAMERA_TRIGGER_DATA {
13601    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13602    pub time_usec: u64,
13603    #[doc = "Image frame sequence"]
13604    pub seq: u32,
13605}
13606impl CAMERA_TRIGGER_DATA {
13607    pub const ENCODED_LEN: usize = 12usize;
13608    pub const DEFAULT: Self = Self {
13609        time_usec: 0_u64,
13610        seq: 0_u32,
13611    };
13612    #[cfg(feature = "arbitrary")]
13613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13614        use arbitrary::{Arbitrary, Unstructured};
13615        let mut buf = [0u8; 1024];
13616        rng.fill_bytes(&mut buf);
13617        let mut unstructured = Unstructured::new(&buf);
13618        Self::arbitrary(&mut unstructured).unwrap_or_default()
13619    }
13620}
13621impl Default for CAMERA_TRIGGER_DATA {
13622    fn default() -> Self {
13623        Self::DEFAULT.clone()
13624    }
13625}
13626impl MessageData for CAMERA_TRIGGER_DATA {
13627    type Message = MavMessage;
13628    const ID: u32 = 112u32;
13629    const NAME: &'static str = "CAMERA_TRIGGER";
13630    const EXTRA_CRC: u8 = 174u8;
13631    const ENCODED_LEN: usize = 12usize;
13632    fn deser(
13633        _version: MavlinkVersion,
13634        __input: &[u8],
13635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13636        let avail_len = __input.len();
13637        let mut payload_buf = [0; Self::ENCODED_LEN];
13638        let mut buf = if avail_len < Self::ENCODED_LEN {
13639            payload_buf[0..avail_len].copy_from_slice(__input);
13640            Bytes::new(&payload_buf)
13641        } else {
13642            Bytes::new(__input)
13643        };
13644        let mut __struct = Self::default();
13645        __struct.time_usec = buf.get_u64_le();
13646        __struct.seq = buf.get_u32_le();
13647        Ok(__struct)
13648    }
13649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13650        let mut __tmp = BytesMut::new(bytes);
13651        #[allow(clippy::absurd_extreme_comparisons)]
13652        #[allow(unused_comparisons)]
13653        if __tmp.remaining() < Self::ENCODED_LEN {
13654            panic!(
13655                "buffer is too small (need {} bytes, but got {})",
13656                Self::ENCODED_LEN,
13657                __tmp.remaining(),
13658            )
13659        }
13660        __tmp.put_u64_le(self.time_usec);
13661        __tmp.put_u32_le(self.seq);
13662        if matches!(version, MavlinkVersion::V2) {
13663            let len = __tmp.len();
13664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13665        } else {
13666            __tmp.len()
13667        }
13668    }
13669}
13670#[doc = "id: 281"]
13671#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13672#[derive(Debug, Clone, PartialEq)]
13673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13675pub struct GIMBAL_MANAGER_STATUS_DATA {
13676    #[doc = "Timestamp (time since system boot)."]
13677    pub time_boot_ms: u32,
13678    #[doc = "High level gimbal manager flags currently applied."]
13679    pub flags: GimbalManagerFlags,
13680    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13681    pub gimbal_device_id: u8,
13682    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13683    pub primary_control_sysid: u8,
13684    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13685    pub primary_control_compid: u8,
13686    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13687    pub secondary_control_sysid: u8,
13688    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13689    pub secondary_control_compid: u8,
13690}
13691impl GIMBAL_MANAGER_STATUS_DATA {
13692    pub const ENCODED_LEN: usize = 13usize;
13693    pub const DEFAULT: Self = Self {
13694        time_boot_ms: 0_u32,
13695        flags: GimbalManagerFlags::DEFAULT,
13696        gimbal_device_id: 0_u8,
13697        primary_control_sysid: 0_u8,
13698        primary_control_compid: 0_u8,
13699        secondary_control_sysid: 0_u8,
13700        secondary_control_compid: 0_u8,
13701    };
13702    #[cfg(feature = "arbitrary")]
13703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13704        use arbitrary::{Arbitrary, Unstructured};
13705        let mut buf = [0u8; 1024];
13706        rng.fill_bytes(&mut buf);
13707        let mut unstructured = Unstructured::new(&buf);
13708        Self::arbitrary(&mut unstructured).unwrap_or_default()
13709    }
13710}
13711impl Default for GIMBAL_MANAGER_STATUS_DATA {
13712    fn default() -> Self {
13713        Self::DEFAULT.clone()
13714    }
13715}
13716impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13717    type Message = MavMessage;
13718    const ID: u32 = 281u32;
13719    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13720    const EXTRA_CRC: u8 = 48u8;
13721    const ENCODED_LEN: usize = 13usize;
13722    fn deser(
13723        _version: MavlinkVersion,
13724        __input: &[u8],
13725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13726        let avail_len = __input.len();
13727        let mut payload_buf = [0; Self::ENCODED_LEN];
13728        let mut buf = if avail_len < Self::ENCODED_LEN {
13729            payload_buf[0..avail_len].copy_from_slice(__input);
13730            Bytes::new(&payload_buf)
13731        } else {
13732            Bytes::new(__input)
13733        };
13734        let mut __struct = Self::default();
13735        __struct.time_boot_ms = buf.get_u32_le();
13736        let tmp = buf.get_u32_le();
13737        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13738            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13739                flag_type: "GimbalManagerFlags",
13740                value: tmp as u32,
13741            })?;
13742        __struct.gimbal_device_id = buf.get_u8();
13743        __struct.primary_control_sysid = buf.get_u8();
13744        __struct.primary_control_compid = buf.get_u8();
13745        __struct.secondary_control_sysid = buf.get_u8();
13746        __struct.secondary_control_compid = buf.get_u8();
13747        Ok(__struct)
13748    }
13749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13750        let mut __tmp = BytesMut::new(bytes);
13751        #[allow(clippy::absurd_extreme_comparisons)]
13752        #[allow(unused_comparisons)]
13753        if __tmp.remaining() < Self::ENCODED_LEN {
13754            panic!(
13755                "buffer is too small (need {} bytes, but got {})",
13756                Self::ENCODED_LEN,
13757                __tmp.remaining(),
13758            )
13759        }
13760        __tmp.put_u32_le(self.time_boot_ms);
13761        __tmp.put_u32_le(self.flags.bits());
13762        __tmp.put_u8(self.gimbal_device_id);
13763        __tmp.put_u8(self.primary_control_sysid);
13764        __tmp.put_u8(self.primary_control_compid);
13765        __tmp.put_u8(self.secondary_control_sysid);
13766        __tmp.put_u8(self.secondary_control_compid);
13767        if matches!(version, MavlinkVersion::V2) {
13768            let len = __tmp.len();
13769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13770        } else {
13771            __tmp.len()
13772        }
13773    }
13774}
13775#[doc = "id: 233"]
13776#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
13777#[derive(Debug, Clone, PartialEq)]
13778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13780pub struct GPS_RTCM_DATA_DATA {
13781    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
13782    pub flags: u8,
13783    #[doc = "data length"]
13784    pub len: u8,
13785    #[doc = "RTCM message (may be fragmented)"]
13786    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13787    pub data: [u8; 180],
13788}
13789impl GPS_RTCM_DATA_DATA {
13790    pub const ENCODED_LEN: usize = 182usize;
13791    pub const DEFAULT: Self = Self {
13792        flags: 0_u8,
13793        len: 0_u8,
13794        data: [0_u8; 180usize],
13795    };
13796    #[cfg(feature = "arbitrary")]
13797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13798        use arbitrary::{Arbitrary, Unstructured};
13799        let mut buf = [0u8; 1024];
13800        rng.fill_bytes(&mut buf);
13801        let mut unstructured = Unstructured::new(&buf);
13802        Self::arbitrary(&mut unstructured).unwrap_or_default()
13803    }
13804}
13805impl Default for GPS_RTCM_DATA_DATA {
13806    fn default() -> Self {
13807        Self::DEFAULT.clone()
13808    }
13809}
13810impl MessageData for GPS_RTCM_DATA_DATA {
13811    type Message = MavMessage;
13812    const ID: u32 = 233u32;
13813    const NAME: &'static str = "GPS_RTCM_DATA";
13814    const EXTRA_CRC: u8 = 35u8;
13815    const ENCODED_LEN: usize = 182usize;
13816    fn deser(
13817        _version: MavlinkVersion,
13818        __input: &[u8],
13819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13820        let avail_len = __input.len();
13821        let mut payload_buf = [0; Self::ENCODED_LEN];
13822        let mut buf = if avail_len < Self::ENCODED_LEN {
13823            payload_buf[0..avail_len].copy_from_slice(__input);
13824            Bytes::new(&payload_buf)
13825        } else {
13826            Bytes::new(__input)
13827        };
13828        let mut __struct = Self::default();
13829        __struct.flags = buf.get_u8();
13830        __struct.len = buf.get_u8();
13831        for v in &mut __struct.data {
13832            let val = buf.get_u8();
13833            *v = val;
13834        }
13835        Ok(__struct)
13836    }
13837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13838        let mut __tmp = BytesMut::new(bytes);
13839        #[allow(clippy::absurd_extreme_comparisons)]
13840        #[allow(unused_comparisons)]
13841        if __tmp.remaining() < Self::ENCODED_LEN {
13842            panic!(
13843                "buffer is too small (need {} bytes, but got {})",
13844                Self::ENCODED_LEN,
13845                __tmp.remaining(),
13846            )
13847        }
13848        __tmp.put_u8(self.flags);
13849        __tmp.put_u8(self.len);
13850        for val in &self.data {
13851            __tmp.put_u8(*val);
13852        }
13853        if matches!(version, MavlinkVersion::V2) {
13854            let len = __tmp.len();
13855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13856        } else {
13857            __tmp.len()
13858        }
13859    }
13860}
13861#[doc = "id: 230"]
13862#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
13863#[derive(Debug, Clone, PartialEq)]
13864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13866pub struct ESTIMATOR_STATUS_DATA {
13867    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13868    pub time_usec: u64,
13869    #[doc = "Velocity innovation test ratio"]
13870    pub vel_ratio: f32,
13871    #[doc = "Horizontal position innovation test ratio"]
13872    pub pos_horiz_ratio: f32,
13873    #[doc = "Vertical position innovation test ratio"]
13874    pub pos_vert_ratio: f32,
13875    #[doc = "Magnetometer innovation test ratio"]
13876    pub mag_ratio: f32,
13877    #[doc = "Height above terrain innovation test ratio"]
13878    pub hagl_ratio: f32,
13879    #[doc = "True airspeed innovation test ratio"]
13880    pub tas_ratio: f32,
13881    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
13882    pub pos_horiz_accuracy: f32,
13883    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
13884    pub pos_vert_accuracy: f32,
13885    #[doc = "Bitmap indicating which EKF outputs are valid."]
13886    pub flags: EstimatorStatusFlags,
13887}
13888impl ESTIMATOR_STATUS_DATA {
13889    pub const ENCODED_LEN: usize = 42usize;
13890    pub const DEFAULT: Self = Self {
13891        time_usec: 0_u64,
13892        vel_ratio: 0.0_f32,
13893        pos_horiz_ratio: 0.0_f32,
13894        pos_vert_ratio: 0.0_f32,
13895        mag_ratio: 0.0_f32,
13896        hagl_ratio: 0.0_f32,
13897        tas_ratio: 0.0_f32,
13898        pos_horiz_accuracy: 0.0_f32,
13899        pos_vert_accuracy: 0.0_f32,
13900        flags: EstimatorStatusFlags::DEFAULT,
13901    };
13902    #[cfg(feature = "arbitrary")]
13903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13904        use arbitrary::{Arbitrary, Unstructured};
13905        let mut buf = [0u8; 1024];
13906        rng.fill_bytes(&mut buf);
13907        let mut unstructured = Unstructured::new(&buf);
13908        Self::arbitrary(&mut unstructured).unwrap_or_default()
13909    }
13910}
13911impl Default for ESTIMATOR_STATUS_DATA {
13912    fn default() -> Self {
13913        Self::DEFAULT.clone()
13914    }
13915}
13916impl MessageData for ESTIMATOR_STATUS_DATA {
13917    type Message = MavMessage;
13918    const ID: u32 = 230u32;
13919    const NAME: &'static str = "ESTIMATOR_STATUS";
13920    const EXTRA_CRC: u8 = 163u8;
13921    const ENCODED_LEN: usize = 42usize;
13922    fn deser(
13923        _version: MavlinkVersion,
13924        __input: &[u8],
13925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13926        let avail_len = __input.len();
13927        let mut payload_buf = [0; Self::ENCODED_LEN];
13928        let mut buf = if avail_len < Self::ENCODED_LEN {
13929            payload_buf[0..avail_len].copy_from_slice(__input);
13930            Bytes::new(&payload_buf)
13931        } else {
13932            Bytes::new(__input)
13933        };
13934        let mut __struct = Self::default();
13935        __struct.time_usec = buf.get_u64_le();
13936        __struct.vel_ratio = buf.get_f32_le();
13937        __struct.pos_horiz_ratio = buf.get_f32_le();
13938        __struct.pos_vert_ratio = buf.get_f32_le();
13939        __struct.mag_ratio = buf.get_f32_le();
13940        __struct.hagl_ratio = buf.get_f32_le();
13941        __struct.tas_ratio = buf.get_f32_le();
13942        __struct.pos_horiz_accuracy = buf.get_f32_le();
13943        __struct.pos_vert_accuracy = buf.get_f32_le();
13944        let tmp = buf.get_u16_le();
13945        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
13946            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13947                flag_type: "EstimatorStatusFlags",
13948                value: tmp as u32,
13949            })?;
13950        Ok(__struct)
13951    }
13952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13953        let mut __tmp = BytesMut::new(bytes);
13954        #[allow(clippy::absurd_extreme_comparisons)]
13955        #[allow(unused_comparisons)]
13956        if __tmp.remaining() < Self::ENCODED_LEN {
13957            panic!(
13958                "buffer is too small (need {} bytes, but got {})",
13959                Self::ENCODED_LEN,
13960                __tmp.remaining(),
13961            )
13962        }
13963        __tmp.put_u64_le(self.time_usec);
13964        __tmp.put_f32_le(self.vel_ratio);
13965        __tmp.put_f32_le(self.pos_horiz_ratio);
13966        __tmp.put_f32_le(self.pos_vert_ratio);
13967        __tmp.put_f32_le(self.mag_ratio);
13968        __tmp.put_f32_le(self.hagl_ratio);
13969        __tmp.put_f32_le(self.tas_ratio);
13970        __tmp.put_f32_le(self.pos_horiz_accuracy);
13971        __tmp.put_f32_le(self.pos_vert_accuracy);
13972        __tmp.put_u16_le(self.flags.bits());
13973        if matches!(version, MavlinkVersion::V2) {
13974            let len = __tmp.len();
13975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13976        } else {
13977            __tmp.len()
13978        }
13979    }
13980}
13981#[doc = "id: 322"]
13982#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
13983#[derive(Debug, Clone, PartialEq)]
13984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13986pub struct PARAM_EXT_VALUE_DATA {
13987    #[doc = "Total number of parameters"]
13988    pub param_count: u16,
13989    #[doc = "Index of this parameter"]
13990    pub param_index: u16,
13991    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
13992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13993    pub param_id: [u8; 16],
13994    #[doc = "Parameter value"]
13995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13996    pub param_value: [u8; 128],
13997    #[doc = "Parameter type."]
13998    pub param_type: MavParamExtType,
13999}
14000impl PARAM_EXT_VALUE_DATA {
14001    pub const ENCODED_LEN: usize = 149usize;
14002    pub const DEFAULT: Self = Self {
14003        param_count: 0_u16,
14004        param_index: 0_u16,
14005        param_id: [0_u8; 16usize],
14006        param_value: [0_u8; 128usize],
14007        param_type: MavParamExtType::DEFAULT,
14008    };
14009    #[cfg(feature = "arbitrary")]
14010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14011        use arbitrary::{Arbitrary, Unstructured};
14012        let mut buf = [0u8; 1024];
14013        rng.fill_bytes(&mut buf);
14014        let mut unstructured = Unstructured::new(&buf);
14015        Self::arbitrary(&mut unstructured).unwrap_or_default()
14016    }
14017}
14018impl Default for PARAM_EXT_VALUE_DATA {
14019    fn default() -> Self {
14020        Self::DEFAULT.clone()
14021    }
14022}
14023impl MessageData for PARAM_EXT_VALUE_DATA {
14024    type Message = MavMessage;
14025    const ID: u32 = 322u32;
14026    const NAME: &'static str = "PARAM_EXT_VALUE";
14027    const EXTRA_CRC: u8 = 243u8;
14028    const ENCODED_LEN: usize = 149usize;
14029    fn deser(
14030        _version: MavlinkVersion,
14031        __input: &[u8],
14032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14033        let avail_len = __input.len();
14034        let mut payload_buf = [0; Self::ENCODED_LEN];
14035        let mut buf = if avail_len < Self::ENCODED_LEN {
14036            payload_buf[0..avail_len].copy_from_slice(__input);
14037            Bytes::new(&payload_buf)
14038        } else {
14039            Bytes::new(__input)
14040        };
14041        let mut __struct = Self::default();
14042        __struct.param_count = buf.get_u16_le();
14043        __struct.param_index = buf.get_u16_le();
14044        for v in &mut __struct.param_id {
14045            let val = buf.get_u8();
14046            *v = val;
14047        }
14048        for v in &mut __struct.param_value {
14049            let val = buf.get_u8();
14050            *v = val;
14051        }
14052        let tmp = buf.get_u8();
14053        __struct.param_type =
14054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14055                enum_type: "MavParamExtType",
14056                value: tmp as u32,
14057            })?;
14058        Ok(__struct)
14059    }
14060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14061        let mut __tmp = BytesMut::new(bytes);
14062        #[allow(clippy::absurd_extreme_comparisons)]
14063        #[allow(unused_comparisons)]
14064        if __tmp.remaining() < Self::ENCODED_LEN {
14065            panic!(
14066                "buffer is too small (need {} bytes, but got {})",
14067                Self::ENCODED_LEN,
14068                __tmp.remaining(),
14069            )
14070        }
14071        __tmp.put_u16_le(self.param_count);
14072        __tmp.put_u16_le(self.param_index);
14073        for val in &self.param_id {
14074            __tmp.put_u8(*val);
14075        }
14076        for val in &self.param_value {
14077            __tmp.put_u8(*val);
14078        }
14079        __tmp.put_u8(self.param_type as u8);
14080        if matches!(version, MavlinkVersion::V2) {
14081            let len = __tmp.len();
14082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14083        } else {
14084            __tmp.len()
14085        }
14086    }
14087}
14088#[doc = "id: 50"]
14089#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
14090#[derive(Debug, Clone, PartialEq)]
14091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14093pub struct PARAM_MAP_RC_DATA {
14094    #[doc = "Initial parameter value"]
14095    pub param_value0: f32,
14096    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
14097    pub scale: f32,
14098    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
14099    pub param_value_min: f32,
14100    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
14101    pub param_value_max: f32,
14102    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
14103    pub param_index: i16,
14104    #[doc = "System ID"]
14105    pub target_system: u8,
14106    #[doc = "Component ID"]
14107    pub target_component: u8,
14108    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
14109    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14110    pub param_id: [u8; 16],
14111    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
14112    pub parameter_rc_channel_index: u8,
14113}
14114impl PARAM_MAP_RC_DATA {
14115    pub const ENCODED_LEN: usize = 37usize;
14116    pub const DEFAULT: Self = Self {
14117        param_value0: 0.0_f32,
14118        scale: 0.0_f32,
14119        param_value_min: 0.0_f32,
14120        param_value_max: 0.0_f32,
14121        param_index: 0_i16,
14122        target_system: 0_u8,
14123        target_component: 0_u8,
14124        param_id: [0_u8; 16usize],
14125        parameter_rc_channel_index: 0_u8,
14126    };
14127    #[cfg(feature = "arbitrary")]
14128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14129        use arbitrary::{Arbitrary, Unstructured};
14130        let mut buf = [0u8; 1024];
14131        rng.fill_bytes(&mut buf);
14132        let mut unstructured = Unstructured::new(&buf);
14133        Self::arbitrary(&mut unstructured).unwrap_or_default()
14134    }
14135}
14136impl Default for PARAM_MAP_RC_DATA {
14137    fn default() -> Self {
14138        Self::DEFAULT.clone()
14139    }
14140}
14141impl MessageData for PARAM_MAP_RC_DATA {
14142    type Message = MavMessage;
14143    const ID: u32 = 50u32;
14144    const NAME: &'static str = "PARAM_MAP_RC";
14145    const EXTRA_CRC: u8 = 78u8;
14146    const ENCODED_LEN: usize = 37usize;
14147    fn deser(
14148        _version: MavlinkVersion,
14149        __input: &[u8],
14150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14151        let avail_len = __input.len();
14152        let mut payload_buf = [0; Self::ENCODED_LEN];
14153        let mut buf = if avail_len < Self::ENCODED_LEN {
14154            payload_buf[0..avail_len].copy_from_slice(__input);
14155            Bytes::new(&payload_buf)
14156        } else {
14157            Bytes::new(__input)
14158        };
14159        let mut __struct = Self::default();
14160        __struct.param_value0 = buf.get_f32_le();
14161        __struct.scale = buf.get_f32_le();
14162        __struct.param_value_min = buf.get_f32_le();
14163        __struct.param_value_max = buf.get_f32_le();
14164        __struct.param_index = buf.get_i16_le();
14165        __struct.target_system = buf.get_u8();
14166        __struct.target_component = buf.get_u8();
14167        for v in &mut __struct.param_id {
14168            let val = buf.get_u8();
14169            *v = val;
14170        }
14171        __struct.parameter_rc_channel_index = buf.get_u8();
14172        Ok(__struct)
14173    }
14174    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14175        let mut __tmp = BytesMut::new(bytes);
14176        #[allow(clippy::absurd_extreme_comparisons)]
14177        #[allow(unused_comparisons)]
14178        if __tmp.remaining() < Self::ENCODED_LEN {
14179            panic!(
14180                "buffer is too small (need {} bytes, but got {})",
14181                Self::ENCODED_LEN,
14182                __tmp.remaining(),
14183            )
14184        }
14185        __tmp.put_f32_le(self.param_value0);
14186        __tmp.put_f32_le(self.scale);
14187        __tmp.put_f32_le(self.param_value_min);
14188        __tmp.put_f32_le(self.param_value_max);
14189        __tmp.put_i16_le(self.param_index);
14190        __tmp.put_u8(self.target_system);
14191        __tmp.put_u8(self.target_component);
14192        for val in &self.param_id {
14193            __tmp.put_u8(*val);
14194        }
14195        __tmp.put_u8(self.parameter_rc_channel_index);
14196        if matches!(version, MavlinkVersion::V2) {
14197            let len = __tmp.len();
14198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14199        } else {
14200            __tmp.len()
14201        }
14202    }
14203}
14204#[doc = "id: 437"]
14205#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
14206#[derive(Debug, Clone, PartialEq)]
14207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14209pub struct AVAILABLE_MODES_MONITOR_DATA {
14210    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
14211    pub seq: u8,
14212}
14213impl AVAILABLE_MODES_MONITOR_DATA {
14214    pub const ENCODED_LEN: usize = 1usize;
14215    pub const DEFAULT: Self = Self { seq: 0_u8 };
14216    #[cfg(feature = "arbitrary")]
14217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14218        use arbitrary::{Arbitrary, Unstructured};
14219        let mut buf = [0u8; 1024];
14220        rng.fill_bytes(&mut buf);
14221        let mut unstructured = Unstructured::new(&buf);
14222        Self::arbitrary(&mut unstructured).unwrap_or_default()
14223    }
14224}
14225impl Default for AVAILABLE_MODES_MONITOR_DATA {
14226    fn default() -> Self {
14227        Self::DEFAULT.clone()
14228    }
14229}
14230impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
14231    type Message = MavMessage;
14232    const ID: u32 = 437u32;
14233    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
14234    const EXTRA_CRC: u8 = 30u8;
14235    const ENCODED_LEN: usize = 1usize;
14236    fn deser(
14237        _version: MavlinkVersion,
14238        __input: &[u8],
14239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14240        let avail_len = __input.len();
14241        let mut payload_buf = [0; Self::ENCODED_LEN];
14242        let mut buf = if avail_len < Self::ENCODED_LEN {
14243            payload_buf[0..avail_len].copy_from_slice(__input);
14244            Bytes::new(&payload_buf)
14245        } else {
14246            Bytes::new(__input)
14247        };
14248        let mut __struct = Self::default();
14249        __struct.seq = buf.get_u8();
14250        Ok(__struct)
14251    }
14252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14253        let mut __tmp = BytesMut::new(bytes);
14254        #[allow(clippy::absurd_extreme_comparisons)]
14255        #[allow(unused_comparisons)]
14256        if __tmp.remaining() < Self::ENCODED_LEN {
14257            panic!(
14258                "buffer is too small (need {} bytes, but got {})",
14259                Self::ENCODED_LEN,
14260                __tmp.remaining(),
14261            )
14262        }
14263        __tmp.put_u8(self.seq);
14264        if matches!(version, MavlinkVersion::V2) {
14265            let len = __tmp.len();
14266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14267        } else {
14268            __tmp.len()
14269        }
14270    }
14271}
14272#[doc = "id: 134"]
14273#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
14274#[derive(Debug, Clone, PartialEq)]
14275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14277pub struct TERRAIN_DATA_DATA {
14278    #[doc = "Latitude of SW corner of first grid"]
14279    pub lat: i32,
14280    #[doc = "Longitude of SW corner of first grid"]
14281    pub lon: i32,
14282    #[doc = "Grid spacing"]
14283    pub grid_spacing: u16,
14284    #[doc = "Terrain data MSL"]
14285    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14286    pub data: [i16; 16],
14287    #[doc = "bit within the terrain request mask"]
14288    pub gridbit: u8,
14289}
14290impl TERRAIN_DATA_DATA {
14291    pub const ENCODED_LEN: usize = 43usize;
14292    pub const DEFAULT: Self = Self {
14293        lat: 0_i32,
14294        lon: 0_i32,
14295        grid_spacing: 0_u16,
14296        data: [0_i16; 16usize],
14297        gridbit: 0_u8,
14298    };
14299    #[cfg(feature = "arbitrary")]
14300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14301        use arbitrary::{Arbitrary, Unstructured};
14302        let mut buf = [0u8; 1024];
14303        rng.fill_bytes(&mut buf);
14304        let mut unstructured = Unstructured::new(&buf);
14305        Self::arbitrary(&mut unstructured).unwrap_or_default()
14306    }
14307}
14308impl Default for TERRAIN_DATA_DATA {
14309    fn default() -> Self {
14310        Self::DEFAULT.clone()
14311    }
14312}
14313impl MessageData for TERRAIN_DATA_DATA {
14314    type Message = MavMessage;
14315    const ID: u32 = 134u32;
14316    const NAME: &'static str = "TERRAIN_DATA";
14317    const EXTRA_CRC: u8 = 229u8;
14318    const ENCODED_LEN: usize = 43usize;
14319    fn deser(
14320        _version: MavlinkVersion,
14321        __input: &[u8],
14322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14323        let avail_len = __input.len();
14324        let mut payload_buf = [0; Self::ENCODED_LEN];
14325        let mut buf = if avail_len < Self::ENCODED_LEN {
14326            payload_buf[0..avail_len].copy_from_slice(__input);
14327            Bytes::new(&payload_buf)
14328        } else {
14329            Bytes::new(__input)
14330        };
14331        let mut __struct = Self::default();
14332        __struct.lat = buf.get_i32_le();
14333        __struct.lon = buf.get_i32_le();
14334        __struct.grid_spacing = buf.get_u16_le();
14335        for v in &mut __struct.data {
14336            let val = buf.get_i16_le();
14337            *v = val;
14338        }
14339        __struct.gridbit = buf.get_u8();
14340        Ok(__struct)
14341    }
14342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14343        let mut __tmp = BytesMut::new(bytes);
14344        #[allow(clippy::absurd_extreme_comparisons)]
14345        #[allow(unused_comparisons)]
14346        if __tmp.remaining() < Self::ENCODED_LEN {
14347            panic!(
14348                "buffer is too small (need {} bytes, but got {})",
14349                Self::ENCODED_LEN,
14350                __tmp.remaining(),
14351            )
14352        }
14353        __tmp.put_i32_le(self.lat);
14354        __tmp.put_i32_le(self.lon);
14355        __tmp.put_u16_le(self.grid_spacing);
14356        for val in &self.data {
14357            __tmp.put_i16_le(*val);
14358        }
14359        __tmp.put_u8(self.gridbit);
14360        if matches!(version, MavlinkVersion::V2) {
14361            let len = __tmp.len();
14362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14363        } else {
14364            __tmp.len()
14365        }
14366    }
14367}
14368#[doc = "id: 244"]
14369#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
14370#[derive(Debug, Clone, PartialEq)]
14371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14373pub struct MESSAGE_INTERVAL_DATA {
14374    #[doc = "0 indicates the interval at which it is sent."]
14375    pub interval_us: i32,
14376    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
14377    pub message_id: u16,
14378}
14379impl MESSAGE_INTERVAL_DATA {
14380    pub const ENCODED_LEN: usize = 6usize;
14381    pub const DEFAULT: Self = Self {
14382        interval_us: 0_i32,
14383        message_id: 0_u16,
14384    };
14385    #[cfg(feature = "arbitrary")]
14386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14387        use arbitrary::{Arbitrary, Unstructured};
14388        let mut buf = [0u8; 1024];
14389        rng.fill_bytes(&mut buf);
14390        let mut unstructured = Unstructured::new(&buf);
14391        Self::arbitrary(&mut unstructured).unwrap_or_default()
14392    }
14393}
14394impl Default for MESSAGE_INTERVAL_DATA {
14395    fn default() -> Self {
14396        Self::DEFAULT.clone()
14397    }
14398}
14399impl MessageData for MESSAGE_INTERVAL_DATA {
14400    type Message = MavMessage;
14401    const ID: u32 = 244u32;
14402    const NAME: &'static str = "MESSAGE_INTERVAL";
14403    const EXTRA_CRC: u8 = 95u8;
14404    const ENCODED_LEN: usize = 6usize;
14405    fn deser(
14406        _version: MavlinkVersion,
14407        __input: &[u8],
14408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14409        let avail_len = __input.len();
14410        let mut payload_buf = [0; Self::ENCODED_LEN];
14411        let mut buf = if avail_len < Self::ENCODED_LEN {
14412            payload_buf[0..avail_len].copy_from_slice(__input);
14413            Bytes::new(&payload_buf)
14414        } else {
14415            Bytes::new(__input)
14416        };
14417        let mut __struct = Self::default();
14418        __struct.interval_us = buf.get_i32_le();
14419        __struct.message_id = buf.get_u16_le();
14420        Ok(__struct)
14421    }
14422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14423        let mut __tmp = BytesMut::new(bytes);
14424        #[allow(clippy::absurd_extreme_comparisons)]
14425        #[allow(unused_comparisons)]
14426        if __tmp.remaining() < Self::ENCODED_LEN {
14427            panic!(
14428                "buffer is too small (need {} bytes, but got {})",
14429                Self::ENCODED_LEN,
14430                __tmp.remaining(),
14431            )
14432        }
14433        __tmp.put_i32_le(self.interval_us);
14434        __tmp.put_u16_le(self.message_id);
14435        if matches!(version, MavlinkVersion::V2) {
14436            let len = __tmp.len();
14437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14438        } else {
14439            __tmp.len()
14440        }
14441    }
14442}
14443#[doc = "id: 396"]
14444#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
14445#[derive(Debug, Clone, PartialEq)]
14446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14448pub struct COMPONENT_INFORMATION_BASIC_DATA {
14449    #[doc = "Component capability flags"]
14450    pub capabilities: MavProtocolCapability,
14451    #[doc = "Timestamp (time since system boot)."]
14452    pub time_boot_ms: u32,
14453    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
14454    pub time_manufacture_s: u32,
14455    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
14456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14457    pub vendor_name: [u8; 32],
14458    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
14459    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14460    pub model_name: [u8; 32],
14461    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
14462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14463    pub software_version: [u8; 24],
14464    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
14465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14466    pub hardware_version: [u8; 24],
14467    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
14468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14469    pub serial_number: [u8; 32],
14470}
14471impl COMPONENT_INFORMATION_BASIC_DATA {
14472    pub const ENCODED_LEN: usize = 160usize;
14473    pub const DEFAULT: Self = Self {
14474        capabilities: MavProtocolCapability::DEFAULT,
14475        time_boot_ms: 0_u32,
14476        time_manufacture_s: 0_u32,
14477        vendor_name: [0_u8; 32usize],
14478        model_name: [0_u8; 32usize],
14479        software_version: [0_u8; 24usize],
14480        hardware_version: [0_u8; 24usize],
14481        serial_number: [0_u8; 32usize],
14482    };
14483    #[cfg(feature = "arbitrary")]
14484    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14485        use arbitrary::{Arbitrary, Unstructured};
14486        let mut buf = [0u8; 1024];
14487        rng.fill_bytes(&mut buf);
14488        let mut unstructured = Unstructured::new(&buf);
14489        Self::arbitrary(&mut unstructured).unwrap_or_default()
14490    }
14491}
14492impl Default for COMPONENT_INFORMATION_BASIC_DATA {
14493    fn default() -> Self {
14494        Self::DEFAULT.clone()
14495    }
14496}
14497impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
14498    type Message = MavMessage;
14499    const ID: u32 = 396u32;
14500    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
14501    const EXTRA_CRC: u8 = 50u8;
14502    const ENCODED_LEN: usize = 160usize;
14503    fn deser(
14504        _version: MavlinkVersion,
14505        __input: &[u8],
14506    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14507        let avail_len = __input.len();
14508        let mut payload_buf = [0; Self::ENCODED_LEN];
14509        let mut buf = if avail_len < Self::ENCODED_LEN {
14510            payload_buf[0..avail_len].copy_from_slice(__input);
14511            Bytes::new(&payload_buf)
14512        } else {
14513            Bytes::new(__input)
14514        };
14515        let mut __struct = Self::default();
14516        let tmp = buf.get_u64_le();
14517        __struct.capabilities = MavProtocolCapability::from_bits(
14518            tmp & MavProtocolCapability::all().bits(),
14519        )
14520        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14521            flag_type: "MavProtocolCapability",
14522            value: tmp as u32,
14523        })?;
14524        __struct.time_boot_ms = buf.get_u32_le();
14525        __struct.time_manufacture_s = buf.get_u32_le();
14526        for v in &mut __struct.vendor_name {
14527            let val = buf.get_u8();
14528            *v = val;
14529        }
14530        for v in &mut __struct.model_name {
14531            let val = buf.get_u8();
14532            *v = val;
14533        }
14534        for v in &mut __struct.software_version {
14535            let val = buf.get_u8();
14536            *v = val;
14537        }
14538        for v in &mut __struct.hardware_version {
14539            let val = buf.get_u8();
14540            *v = val;
14541        }
14542        for v in &mut __struct.serial_number {
14543            let val = buf.get_u8();
14544            *v = val;
14545        }
14546        Ok(__struct)
14547    }
14548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14549        let mut __tmp = BytesMut::new(bytes);
14550        #[allow(clippy::absurd_extreme_comparisons)]
14551        #[allow(unused_comparisons)]
14552        if __tmp.remaining() < Self::ENCODED_LEN {
14553            panic!(
14554                "buffer is too small (need {} bytes, but got {})",
14555                Self::ENCODED_LEN,
14556                __tmp.remaining(),
14557            )
14558        }
14559        __tmp.put_u64_le(self.capabilities.bits());
14560        __tmp.put_u32_le(self.time_boot_ms);
14561        __tmp.put_u32_le(self.time_manufacture_s);
14562        for val in &self.vendor_name {
14563            __tmp.put_u8(*val);
14564        }
14565        for val in &self.model_name {
14566            __tmp.put_u8(*val);
14567        }
14568        for val in &self.software_version {
14569            __tmp.put_u8(*val);
14570        }
14571        for val in &self.hardware_version {
14572            __tmp.put_u8(*val);
14573        }
14574        for val in &self.serial_number {
14575            __tmp.put_u8(*val);
14576        }
14577        if matches!(version, MavlinkVersion::V2) {
14578            let len = __tmp.len();
14579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14580        } else {
14581            __tmp.len()
14582        }
14583    }
14584}
14585#[doc = "id: 263"]
14586#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
14587#[derive(Debug, Clone, PartialEq)]
14588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14590pub struct CAMERA_IMAGE_CAPTURED_DATA {
14591    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
14592    pub time_utc: u64,
14593    #[doc = "Timestamp (time since system boot)."]
14594    pub time_boot_ms: u32,
14595    #[doc = "Latitude where image was taken"]
14596    pub lat: i32,
14597    #[doc = "Longitude where capture was taken"]
14598    pub lon: i32,
14599    #[doc = "Altitude (MSL) where image was taken"]
14600    pub alt: i32,
14601    #[doc = "Altitude above ground"]
14602    pub relative_alt: i32,
14603    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
14604    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14605    pub q: [f32; 4],
14606    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
14607    pub image_index: i32,
14608    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
14609    pub camera_id: u8,
14610    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
14611    pub capture_result: i8,
14612    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
14613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14614    pub file_url: [u8; 205],
14615}
14616impl CAMERA_IMAGE_CAPTURED_DATA {
14617    pub const ENCODED_LEN: usize = 255usize;
14618    pub const DEFAULT: Self = Self {
14619        time_utc: 0_u64,
14620        time_boot_ms: 0_u32,
14621        lat: 0_i32,
14622        lon: 0_i32,
14623        alt: 0_i32,
14624        relative_alt: 0_i32,
14625        q: [0.0_f32; 4usize],
14626        image_index: 0_i32,
14627        camera_id: 0_u8,
14628        capture_result: 0_i8,
14629        file_url: [0_u8; 205usize],
14630    };
14631    #[cfg(feature = "arbitrary")]
14632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14633        use arbitrary::{Arbitrary, Unstructured};
14634        let mut buf = [0u8; 1024];
14635        rng.fill_bytes(&mut buf);
14636        let mut unstructured = Unstructured::new(&buf);
14637        Self::arbitrary(&mut unstructured).unwrap_or_default()
14638    }
14639}
14640impl Default for CAMERA_IMAGE_CAPTURED_DATA {
14641    fn default() -> Self {
14642        Self::DEFAULT.clone()
14643    }
14644}
14645impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
14646    type Message = MavMessage;
14647    const ID: u32 = 263u32;
14648    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
14649    const EXTRA_CRC: u8 = 133u8;
14650    const ENCODED_LEN: usize = 255usize;
14651    fn deser(
14652        _version: MavlinkVersion,
14653        __input: &[u8],
14654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14655        let avail_len = __input.len();
14656        let mut payload_buf = [0; Self::ENCODED_LEN];
14657        let mut buf = if avail_len < Self::ENCODED_LEN {
14658            payload_buf[0..avail_len].copy_from_slice(__input);
14659            Bytes::new(&payload_buf)
14660        } else {
14661            Bytes::new(__input)
14662        };
14663        let mut __struct = Self::default();
14664        __struct.time_utc = buf.get_u64_le();
14665        __struct.time_boot_ms = buf.get_u32_le();
14666        __struct.lat = buf.get_i32_le();
14667        __struct.lon = buf.get_i32_le();
14668        __struct.alt = buf.get_i32_le();
14669        __struct.relative_alt = buf.get_i32_le();
14670        for v in &mut __struct.q {
14671            let val = buf.get_f32_le();
14672            *v = val;
14673        }
14674        __struct.image_index = buf.get_i32_le();
14675        __struct.camera_id = buf.get_u8();
14676        __struct.capture_result = buf.get_i8();
14677        for v in &mut __struct.file_url {
14678            let val = buf.get_u8();
14679            *v = val;
14680        }
14681        Ok(__struct)
14682    }
14683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14684        let mut __tmp = BytesMut::new(bytes);
14685        #[allow(clippy::absurd_extreme_comparisons)]
14686        #[allow(unused_comparisons)]
14687        if __tmp.remaining() < Self::ENCODED_LEN {
14688            panic!(
14689                "buffer is too small (need {} bytes, but got {})",
14690                Self::ENCODED_LEN,
14691                __tmp.remaining(),
14692            )
14693        }
14694        __tmp.put_u64_le(self.time_utc);
14695        __tmp.put_u32_le(self.time_boot_ms);
14696        __tmp.put_i32_le(self.lat);
14697        __tmp.put_i32_le(self.lon);
14698        __tmp.put_i32_le(self.alt);
14699        __tmp.put_i32_le(self.relative_alt);
14700        for val in &self.q {
14701            __tmp.put_f32_le(*val);
14702        }
14703        __tmp.put_i32_le(self.image_index);
14704        __tmp.put_u8(self.camera_id);
14705        __tmp.put_i8(self.capture_result);
14706        for val in &self.file_url {
14707            __tmp.put_u8(*val);
14708        }
14709        if matches!(version, MavlinkVersion::V2) {
14710            let len = __tmp.len();
14711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14712        } else {
14713            __tmp.len()
14714        }
14715    }
14716}
14717#[doc = "id: 25"]
14718#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14719#[derive(Debug, Clone, PartialEq)]
14720#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14721#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14722pub struct GPS_STATUS_DATA {
14723    #[doc = "Number of satellites visible"]
14724    pub satellites_visible: u8,
14725    #[doc = "Global satellite ID"]
14726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14727    pub satellite_prn: [u8; 20],
14728    #[doc = "0: Satellite not used, 1: used for localization"]
14729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14730    pub satellite_used: [u8; 20],
14731    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14733    pub satellite_elevation: [u8; 20],
14734    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14735    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14736    pub satellite_azimuth: [u8; 20],
14737    #[doc = "Signal to noise ratio of satellite"]
14738    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14739    pub satellite_snr: [u8; 20],
14740}
14741impl GPS_STATUS_DATA {
14742    pub const ENCODED_LEN: usize = 101usize;
14743    pub const DEFAULT: Self = Self {
14744        satellites_visible: 0_u8,
14745        satellite_prn: [0_u8; 20usize],
14746        satellite_used: [0_u8; 20usize],
14747        satellite_elevation: [0_u8; 20usize],
14748        satellite_azimuth: [0_u8; 20usize],
14749        satellite_snr: [0_u8; 20usize],
14750    };
14751    #[cfg(feature = "arbitrary")]
14752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14753        use arbitrary::{Arbitrary, Unstructured};
14754        let mut buf = [0u8; 1024];
14755        rng.fill_bytes(&mut buf);
14756        let mut unstructured = Unstructured::new(&buf);
14757        Self::arbitrary(&mut unstructured).unwrap_or_default()
14758    }
14759}
14760impl Default for GPS_STATUS_DATA {
14761    fn default() -> Self {
14762        Self::DEFAULT.clone()
14763    }
14764}
14765impl MessageData for GPS_STATUS_DATA {
14766    type Message = MavMessage;
14767    const ID: u32 = 25u32;
14768    const NAME: &'static str = "GPS_STATUS";
14769    const EXTRA_CRC: u8 = 23u8;
14770    const ENCODED_LEN: usize = 101usize;
14771    fn deser(
14772        _version: MavlinkVersion,
14773        __input: &[u8],
14774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14775        let avail_len = __input.len();
14776        let mut payload_buf = [0; Self::ENCODED_LEN];
14777        let mut buf = if avail_len < Self::ENCODED_LEN {
14778            payload_buf[0..avail_len].copy_from_slice(__input);
14779            Bytes::new(&payload_buf)
14780        } else {
14781            Bytes::new(__input)
14782        };
14783        let mut __struct = Self::default();
14784        __struct.satellites_visible = buf.get_u8();
14785        for v in &mut __struct.satellite_prn {
14786            let val = buf.get_u8();
14787            *v = val;
14788        }
14789        for v in &mut __struct.satellite_used {
14790            let val = buf.get_u8();
14791            *v = val;
14792        }
14793        for v in &mut __struct.satellite_elevation {
14794            let val = buf.get_u8();
14795            *v = val;
14796        }
14797        for v in &mut __struct.satellite_azimuth {
14798            let val = buf.get_u8();
14799            *v = val;
14800        }
14801        for v in &mut __struct.satellite_snr {
14802            let val = buf.get_u8();
14803            *v = val;
14804        }
14805        Ok(__struct)
14806    }
14807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14808        let mut __tmp = BytesMut::new(bytes);
14809        #[allow(clippy::absurd_extreme_comparisons)]
14810        #[allow(unused_comparisons)]
14811        if __tmp.remaining() < Self::ENCODED_LEN {
14812            panic!(
14813                "buffer is too small (need {} bytes, but got {})",
14814                Self::ENCODED_LEN,
14815                __tmp.remaining(),
14816            )
14817        }
14818        __tmp.put_u8(self.satellites_visible);
14819        for val in &self.satellite_prn {
14820            __tmp.put_u8(*val);
14821        }
14822        for val in &self.satellite_used {
14823            __tmp.put_u8(*val);
14824        }
14825        for val in &self.satellite_elevation {
14826            __tmp.put_u8(*val);
14827        }
14828        for val in &self.satellite_azimuth {
14829            __tmp.put_u8(*val);
14830        }
14831        for val in &self.satellite_snr {
14832            __tmp.put_u8(*val);
14833        }
14834        if matches!(version, MavlinkVersion::V2) {
14835            let len = __tmp.len();
14836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14837        } else {
14838            __tmp.len()
14839        }
14840    }
14841}
14842#[doc = "id: 135"]
14843#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
14844#[derive(Debug, Clone, PartialEq)]
14845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14847pub struct TERRAIN_CHECK_DATA {
14848    #[doc = "Latitude"]
14849    pub lat: i32,
14850    #[doc = "Longitude"]
14851    pub lon: i32,
14852}
14853impl TERRAIN_CHECK_DATA {
14854    pub const ENCODED_LEN: usize = 8usize;
14855    pub const DEFAULT: Self = Self {
14856        lat: 0_i32,
14857        lon: 0_i32,
14858    };
14859    #[cfg(feature = "arbitrary")]
14860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14861        use arbitrary::{Arbitrary, Unstructured};
14862        let mut buf = [0u8; 1024];
14863        rng.fill_bytes(&mut buf);
14864        let mut unstructured = Unstructured::new(&buf);
14865        Self::arbitrary(&mut unstructured).unwrap_or_default()
14866    }
14867}
14868impl Default for TERRAIN_CHECK_DATA {
14869    fn default() -> Self {
14870        Self::DEFAULT.clone()
14871    }
14872}
14873impl MessageData for TERRAIN_CHECK_DATA {
14874    type Message = MavMessage;
14875    const ID: u32 = 135u32;
14876    const NAME: &'static str = "TERRAIN_CHECK";
14877    const EXTRA_CRC: u8 = 203u8;
14878    const ENCODED_LEN: usize = 8usize;
14879    fn deser(
14880        _version: MavlinkVersion,
14881        __input: &[u8],
14882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14883        let avail_len = __input.len();
14884        let mut payload_buf = [0; Self::ENCODED_LEN];
14885        let mut buf = if avail_len < Self::ENCODED_LEN {
14886            payload_buf[0..avail_len].copy_from_slice(__input);
14887            Bytes::new(&payload_buf)
14888        } else {
14889            Bytes::new(__input)
14890        };
14891        let mut __struct = Self::default();
14892        __struct.lat = buf.get_i32_le();
14893        __struct.lon = buf.get_i32_le();
14894        Ok(__struct)
14895    }
14896    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14897        let mut __tmp = BytesMut::new(bytes);
14898        #[allow(clippy::absurd_extreme_comparisons)]
14899        #[allow(unused_comparisons)]
14900        if __tmp.remaining() < Self::ENCODED_LEN {
14901            panic!(
14902                "buffer is too small (need {} bytes, but got {})",
14903                Self::ENCODED_LEN,
14904                __tmp.remaining(),
14905            )
14906        }
14907        __tmp.put_i32_le(self.lat);
14908        __tmp.put_i32_le(self.lon);
14909        if matches!(version, MavlinkVersion::V2) {
14910            let len = __tmp.len();
14911            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14912        } else {
14913            __tmp.len()
14914        }
14915    }
14916}
14917#[doc = "id: 125"]
14918#[doc = "Power supply status."]
14919#[derive(Debug, Clone, PartialEq)]
14920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14922pub struct POWER_STATUS_DATA {
14923    #[doc = "5V rail voltage."]
14924    pub Vcc: u16,
14925    #[doc = "Servo rail voltage."]
14926    pub Vservo: u16,
14927    #[doc = "Bitmap of power supply status flags."]
14928    pub flags: MavPowerStatus,
14929}
14930impl POWER_STATUS_DATA {
14931    pub const ENCODED_LEN: usize = 6usize;
14932    pub const DEFAULT: Self = Self {
14933        Vcc: 0_u16,
14934        Vservo: 0_u16,
14935        flags: MavPowerStatus::DEFAULT,
14936    };
14937    #[cfg(feature = "arbitrary")]
14938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14939        use arbitrary::{Arbitrary, Unstructured};
14940        let mut buf = [0u8; 1024];
14941        rng.fill_bytes(&mut buf);
14942        let mut unstructured = Unstructured::new(&buf);
14943        Self::arbitrary(&mut unstructured).unwrap_or_default()
14944    }
14945}
14946impl Default for POWER_STATUS_DATA {
14947    fn default() -> Self {
14948        Self::DEFAULT.clone()
14949    }
14950}
14951impl MessageData for POWER_STATUS_DATA {
14952    type Message = MavMessage;
14953    const ID: u32 = 125u32;
14954    const NAME: &'static str = "POWER_STATUS";
14955    const EXTRA_CRC: u8 = 203u8;
14956    const ENCODED_LEN: usize = 6usize;
14957    fn deser(
14958        _version: MavlinkVersion,
14959        __input: &[u8],
14960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14961        let avail_len = __input.len();
14962        let mut payload_buf = [0; Self::ENCODED_LEN];
14963        let mut buf = if avail_len < Self::ENCODED_LEN {
14964            payload_buf[0..avail_len].copy_from_slice(__input);
14965            Bytes::new(&payload_buf)
14966        } else {
14967            Bytes::new(__input)
14968        };
14969        let mut __struct = Self::default();
14970        __struct.Vcc = buf.get_u16_le();
14971        __struct.Vservo = buf.get_u16_le();
14972        let tmp = buf.get_u16_le();
14973        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
14974            ::mavlink_core::error::ParserError::InvalidFlag {
14975                flag_type: "MavPowerStatus",
14976                value: tmp as u32,
14977            },
14978        )?;
14979        Ok(__struct)
14980    }
14981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14982        let mut __tmp = BytesMut::new(bytes);
14983        #[allow(clippy::absurd_extreme_comparisons)]
14984        #[allow(unused_comparisons)]
14985        if __tmp.remaining() < Self::ENCODED_LEN {
14986            panic!(
14987                "buffer is too small (need {} bytes, but got {})",
14988                Self::ENCODED_LEN,
14989                __tmp.remaining(),
14990            )
14991        }
14992        __tmp.put_u16_le(self.Vcc);
14993        __tmp.put_u16_le(self.Vservo);
14994        __tmp.put_u16_le(self.flags.bits());
14995        if matches!(version, MavlinkVersion::V2) {
14996            let len = __tmp.len();
14997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14998        } else {
14999            __tmp.len()
15000        }
15001    }
15002}
15003#[doc = "id: 41"]
15004#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
15005#[derive(Debug, Clone, PartialEq)]
15006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15008pub struct MISSION_SET_CURRENT_DATA {
15009    #[doc = "Sequence"]
15010    pub seq: u16,
15011    #[doc = "System ID"]
15012    pub target_system: u8,
15013    #[doc = "Component ID"]
15014    pub target_component: u8,
15015}
15016impl MISSION_SET_CURRENT_DATA {
15017    pub const ENCODED_LEN: usize = 4usize;
15018    pub const DEFAULT: Self = Self {
15019        seq: 0_u16,
15020        target_system: 0_u8,
15021        target_component: 0_u8,
15022    };
15023    #[cfg(feature = "arbitrary")]
15024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15025        use arbitrary::{Arbitrary, Unstructured};
15026        let mut buf = [0u8; 1024];
15027        rng.fill_bytes(&mut buf);
15028        let mut unstructured = Unstructured::new(&buf);
15029        Self::arbitrary(&mut unstructured).unwrap_or_default()
15030    }
15031}
15032impl Default for MISSION_SET_CURRENT_DATA {
15033    fn default() -> Self {
15034        Self::DEFAULT.clone()
15035    }
15036}
15037impl MessageData for MISSION_SET_CURRENT_DATA {
15038    type Message = MavMessage;
15039    const ID: u32 = 41u32;
15040    const NAME: &'static str = "MISSION_SET_CURRENT";
15041    const EXTRA_CRC: u8 = 28u8;
15042    const ENCODED_LEN: usize = 4usize;
15043    fn deser(
15044        _version: MavlinkVersion,
15045        __input: &[u8],
15046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15047        let avail_len = __input.len();
15048        let mut payload_buf = [0; Self::ENCODED_LEN];
15049        let mut buf = if avail_len < Self::ENCODED_LEN {
15050            payload_buf[0..avail_len].copy_from_slice(__input);
15051            Bytes::new(&payload_buf)
15052        } else {
15053            Bytes::new(__input)
15054        };
15055        let mut __struct = Self::default();
15056        __struct.seq = buf.get_u16_le();
15057        __struct.target_system = buf.get_u8();
15058        __struct.target_component = buf.get_u8();
15059        Ok(__struct)
15060    }
15061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15062        let mut __tmp = BytesMut::new(bytes);
15063        #[allow(clippy::absurd_extreme_comparisons)]
15064        #[allow(unused_comparisons)]
15065        if __tmp.remaining() < Self::ENCODED_LEN {
15066            panic!(
15067                "buffer is too small (need {} bytes, but got {})",
15068                Self::ENCODED_LEN,
15069                __tmp.remaining(),
15070            )
15071        }
15072        __tmp.put_u16_le(self.seq);
15073        __tmp.put_u8(self.target_system);
15074        __tmp.put_u8(self.target_component);
15075        if matches!(version, MavlinkVersion::V2) {
15076            let len = __tmp.len();
15077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15078        } else {
15079            __tmp.len()
15080        }
15081    }
15082}
15083#[doc = "id: 330"]
15084#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
15085#[derive(Debug, Clone, PartialEq)]
15086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15088pub struct OBSTACLE_DISTANCE_DATA {
15089    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15090    pub time_usec: u64,
15091    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
15092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15093    pub distances: [u16; 72],
15094    #[doc = "Minimum distance the sensor can measure."]
15095    pub min_distance: u16,
15096    #[doc = "Maximum distance the sensor can measure."]
15097    pub max_distance: u16,
15098    #[doc = "Class id of the distance sensor type."]
15099    pub sensor_type: MavDistanceSensor,
15100    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
15101    pub increment: u8,
15102    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
15103    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15104    pub increment_f: f32,
15105    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
15106    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15107    pub angle_offset: f32,
15108    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
15109    #[cfg_attr(feature = "serde", serde(default))]
15110    pub frame: MavFrame,
15111}
15112impl OBSTACLE_DISTANCE_DATA {
15113    pub const ENCODED_LEN: usize = 167usize;
15114    pub const DEFAULT: Self = Self {
15115        time_usec: 0_u64,
15116        distances: [0_u16; 72usize],
15117        min_distance: 0_u16,
15118        max_distance: 0_u16,
15119        sensor_type: MavDistanceSensor::DEFAULT,
15120        increment: 0_u8,
15121        increment_f: 0.0_f32,
15122        angle_offset: 0.0_f32,
15123        frame: MavFrame::DEFAULT,
15124    };
15125    #[cfg(feature = "arbitrary")]
15126    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15127        use arbitrary::{Arbitrary, Unstructured};
15128        let mut buf = [0u8; 1024];
15129        rng.fill_bytes(&mut buf);
15130        let mut unstructured = Unstructured::new(&buf);
15131        Self::arbitrary(&mut unstructured).unwrap_or_default()
15132    }
15133}
15134impl Default for OBSTACLE_DISTANCE_DATA {
15135    fn default() -> Self {
15136        Self::DEFAULT.clone()
15137    }
15138}
15139impl MessageData for OBSTACLE_DISTANCE_DATA {
15140    type Message = MavMessage;
15141    const ID: u32 = 330u32;
15142    const NAME: &'static str = "OBSTACLE_DISTANCE";
15143    const EXTRA_CRC: u8 = 23u8;
15144    const ENCODED_LEN: usize = 167usize;
15145    fn deser(
15146        _version: MavlinkVersion,
15147        __input: &[u8],
15148    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15149        let avail_len = __input.len();
15150        let mut payload_buf = [0; Self::ENCODED_LEN];
15151        let mut buf = if avail_len < Self::ENCODED_LEN {
15152            payload_buf[0..avail_len].copy_from_slice(__input);
15153            Bytes::new(&payload_buf)
15154        } else {
15155            Bytes::new(__input)
15156        };
15157        let mut __struct = Self::default();
15158        __struct.time_usec = buf.get_u64_le();
15159        for v in &mut __struct.distances {
15160            let val = buf.get_u16_le();
15161            *v = val;
15162        }
15163        __struct.min_distance = buf.get_u16_le();
15164        __struct.max_distance = buf.get_u16_le();
15165        let tmp = buf.get_u8();
15166        __struct.sensor_type =
15167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15168                enum_type: "MavDistanceSensor",
15169                value: tmp as u32,
15170            })?;
15171        __struct.increment = buf.get_u8();
15172        __struct.increment_f = buf.get_f32_le();
15173        __struct.angle_offset = buf.get_f32_le();
15174        let tmp = buf.get_u8();
15175        __struct.frame =
15176            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15177                enum_type: "MavFrame",
15178                value: tmp as u32,
15179            })?;
15180        Ok(__struct)
15181    }
15182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15183        let mut __tmp = BytesMut::new(bytes);
15184        #[allow(clippy::absurd_extreme_comparisons)]
15185        #[allow(unused_comparisons)]
15186        if __tmp.remaining() < Self::ENCODED_LEN {
15187            panic!(
15188                "buffer is too small (need {} bytes, but got {})",
15189                Self::ENCODED_LEN,
15190                __tmp.remaining(),
15191            )
15192        }
15193        __tmp.put_u64_le(self.time_usec);
15194        for val in &self.distances {
15195            __tmp.put_u16_le(*val);
15196        }
15197        __tmp.put_u16_le(self.min_distance);
15198        __tmp.put_u16_le(self.max_distance);
15199        __tmp.put_u8(self.sensor_type as u8);
15200        __tmp.put_u8(self.increment);
15201        __tmp.put_f32_le(self.increment_f);
15202        __tmp.put_f32_le(self.angle_offset);
15203        __tmp.put_u8(self.frame as u8);
15204        if matches!(version, MavlinkVersion::V2) {
15205            let len = __tmp.len();
15206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15207        } else {
15208            __tmp.len()
15209        }
15210    }
15211}
15212#[doc = "id: 40"]
15213#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
15214#[derive(Debug, Clone, PartialEq)]
15215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15217pub struct MISSION_REQUEST_DATA {
15218    #[doc = "Sequence"]
15219    pub seq: u16,
15220    #[doc = "System ID"]
15221    pub target_system: u8,
15222    #[doc = "Component ID"]
15223    pub target_component: u8,
15224    #[doc = "Mission type."]
15225    #[cfg_attr(feature = "serde", serde(default))]
15226    pub mission_type: MavMissionType,
15227}
15228impl MISSION_REQUEST_DATA {
15229    pub const ENCODED_LEN: usize = 5usize;
15230    pub const DEFAULT: Self = Self {
15231        seq: 0_u16,
15232        target_system: 0_u8,
15233        target_component: 0_u8,
15234        mission_type: MavMissionType::DEFAULT,
15235    };
15236    #[cfg(feature = "arbitrary")]
15237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15238        use arbitrary::{Arbitrary, Unstructured};
15239        let mut buf = [0u8; 1024];
15240        rng.fill_bytes(&mut buf);
15241        let mut unstructured = Unstructured::new(&buf);
15242        Self::arbitrary(&mut unstructured).unwrap_or_default()
15243    }
15244}
15245impl Default for MISSION_REQUEST_DATA {
15246    fn default() -> Self {
15247        Self::DEFAULT.clone()
15248    }
15249}
15250impl MessageData for MISSION_REQUEST_DATA {
15251    type Message = MavMessage;
15252    const ID: u32 = 40u32;
15253    const NAME: &'static str = "MISSION_REQUEST";
15254    const EXTRA_CRC: u8 = 230u8;
15255    const ENCODED_LEN: usize = 5usize;
15256    fn deser(
15257        _version: MavlinkVersion,
15258        __input: &[u8],
15259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15260        let avail_len = __input.len();
15261        let mut payload_buf = [0; Self::ENCODED_LEN];
15262        let mut buf = if avail_len < Self::ENCODED_LEN {
15263            payload_buf[0..avail_len].copy_from_slice(__input);
15264            Bytes::new(&payload_buf)
15265        } else {
15266            Bytes::new(__input)
15267        };
15268        let mut __struct = Self::default();
15269        __struct.seq = buf.get_u16_le();
15270        __struct.target_system = buf.get_u8();
15271        __struct.target_component = buf.get_u8();
15272        let tmp = buf.get_u8();
15273        __struct.mission_type =
15274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15275                enum_type: "MavMissionType",
15276                value: tmp as u32,
15277            })?;
15278        Ok(__struct)
15279    }
15280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15281        let mut __tmp = BytesMut::new(bytes);
15282        #[allow(clippy::absurd_extreme_comparisons)]
15283        #[allow(unused_comparisons)]
15284        if __tmp.remaining() < Self::ENCODED_LEN {
15285            panic!(
15286                "buffer is too small (need {} bytes, but got {})",
15287                Self::ENCODED_LEN,
15288                __tmp.remaining(),
15289            )
15290        }
15291        __tmp.put_u16_le(self.seq);
15292        __tmp.put_u8(self.target_system);
15293        __tmp.put_u8(self.target_component);
15294        __tmp.put_u8(self.mission_type as u8);
15295        if matches!(version, MavlinkVersion::V2) {
15296            let len = __tmp.len();
15297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15298        } else {
15299            __tmp.len()
15300        }
15301    }
15302}
15303#[doc = "id: 12915"]
15304#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
15305#[derive(Debug, Clone, PartialEq)]
15306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15308pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
15309    #[doc = "System ID (0 for broadcast)."]
15310    pub target_system: u8,
15311    #[doc = "Component ID (0 for broadcast)."]
15312    pub target_component: u8,
15313    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
15314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15315    pub id_or_mac: [u8; 20],
15316    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
15317    pub single_message_size: u8,
15318    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
15319    pub msg_pack_size: u8,
15320    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
15321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15322    pub messages: [u8; 225],
15323}
15324impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
15325    pub const ENCODED_LEN: usize = 249usize;
15326    pub const DEFAULT: Self = Self {
15327        target_system: 0_u8,
15328        target_component: 0_u8,
15329        id_or_mac: [0_u8; 20usize],
15330        single_message_size: 0_u8,
15331        msg_pack_size: 0_u8,
15332        messages: [0_u8; 225usize],
15333    };
15334    #[cfg(feature = "arbitrary")]
15335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15336        use arbitrary::{Arbitrary, Unstructured};
15337        let mut buf = [0u8; 1024];
15338        rng.fill_bytes(&mut buf);
15339        let mut unstructured = Unstructured::new(&buf);
15340        Self::arbitrary(&mut unstructured).unwrap_or_default()
15341    }
15342}
15343impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
15344    fn default() -> Self {
15345        Self::DEFAULT.clone()
15346    }
15347}
15348impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
15349    type Message = MavMessage;
15350    const ID: u32 = 12915u32;
15351    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
15352    const EXTRA_CRC: u8 = 94u8;
15353    const ENCODED_LEN: usize = 249usize;
15354    fn deser(
15355        _version: MavlinkVersion,
15356        __input: &[u8],
15357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15358        let avail_len = __input.len();
15359        let mut payload_buf = [0; Self::ENCODED_LEN];
15360        let mut buf = if avail_len < Self::ENCODED_LEN {
15361            payload_buf[0..avail_len].copy_from_slice(__input);
15362            Bytes::new(&payload_buf)
15363        } else {
15364            Bytes::new(__input)
15365        };
15366        let mut __struct = Self::default();
15367        __struct.target_system = buf.get_u8();
15368        __struct.target_component = buf.get_u8();
15369        for v in &mut __struct.id_or_mac {
15370            let val = buf.get_u8();
15371            *v = val;
15372        }
15373        __struct.single_message_size = buf.get_u8();
15374        __struct.msg_pack_size = buf.get_u8();
15375        for v in &mut __struct.messages {
15376            let val = buf.get_u8();
15377            *v = val;
15378        }
15379        Ok(__struct)
15380    }
15381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15382        let mut __tmp = BytesMut::new(bytes);
15383        #[allow(clippy::absurd_extreme_comparisons)]
15384        #[allow(unused_comparisons)]
15385        if __tmp.remaining() < Self::ENCODED_LEN {
15386            panic!(
15387                "buffer is too small (need {} bytes, but got {})",
15388                Self::ENCODED_LEN,
15389                __tmp.remaining(),
15390            )
15391        }
15392        __tmp.put_u8(self.target_system);
15393        __tmp.put_u8(self.target_component);
15394        for val in &self.id_or_mac {
15395            __tmp.put_u8(*val);
15396        }
15397        __tmp.put_u8(self.single_message_size);
15398        __tmp.put_u8(self.msg_pack_size);
15399        for val in &self.messages {
15400            __tmp.put_u8(*val);
15401        }
15402        if matches!(version, MavlinkVersion::V2) {
15403            let len = __tmp.len();
15404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15405        } else {
15406            __tmp.len()
15407        }
15408    }
15409}
15410#[doc = "id: 45"]
15411#[doc = "Delete all mission items at once."]
15412#[derive(Debug, Clone, PartialEq)]
15413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15415pub struct MISSION_CLEAR_ALL_DATA {
15416    #[doc = "System ID"]
15417    pub target_system: u8,
15418    #[doc = "Component ID"]
15419    pub target_component: u8,
15420    #[doc = "Mission type."]
15421    #[cfg_attr(feature = "serde", serde(default))]
15422    pub mission_type: MavMissionType,
15423}
15424impl MISSION_CLEAR_ALL_DATA {
15425    pub const ENCODED_LEN: usize = 3usize;
15426    pub const DEFAULT: Self = Self {
15427        target_system: 0_u8,
15428        target_component: 0_u8,
15429        mission_type: MavMissionType::DEFAULT,
15430    };
15431    #[cfg(feature = "arbitrary")]
15432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15433        use arbitrary::{Arbitrary, Unstructured};
15434        let mut buf = [0u8; 1024];
15435        rng.fill_bytes(&mut buf);
15436        let mut unstructured = Unstructured::new(&buf);
15437        Self::arbitrary(&mut unstructured).unwrap_or_default()
15438    }
15439}
15440impl Default for MISSION_CLEAR_ALL_DATA {
15441    fn default() -> Self {
15442        Self::DEFAULT.clone()
15443    }
15444}
15445impl MessageData for MISSION_CLEAR_ALL_DATA {
15446    type Message = MavMessage;
15447    const ID: u32 = 45u32;
15448    const NAME: &'static str = "MISSION_CLEAR_ALL";
15449    const EXTRA_CRC: u8 = 232u8;
15450    const ENCODED_LEN: usize = 3usize;
15451    fn deser(
15452        _version: MavlinkVersion,
15453        __input: &[u8],
15454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15455        let avail_len = __input.len();
15456        let mut payload_buf = [0; Self::ENCODED_LEN];
15457        let mut buf = if avail_len < Self::ENCODED_LEN {
15458            payload_buf[0..avail_len].copy_from_slice(__input);
15459            Bytes::new(&payload_buf)
15460        } else {
15461            Bytes::new(__input)
15462        };
15463        let mut __struct = Self::default();
15464        __struct.target_system = buf.get_u8();
15465        __struct.target_component = buf.get_u8();
15466        let tmp = buf.get_u8();
15467        __struct.mission_type =
15468            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15469                enum_type: "MavMissionType",
15470                value: tmp as u32,
15471            })?;
15472        Ok(__struct)
15473    }
15474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15475        let mut __tmp = BytesMut::new(bytes);
15476        #[allow(clippy::absurd_extreme_comparisons)]
15477        #[allow(unused_comparisons)]
15478        if __tmp.remaining() < Self::ENCODED_LEN {
15479            panic!(
15480                "buffer is too small (need {} bytes, but got {})",
15481                Self::ENCODED_LEN,
15482                __tmp.remaining(),
15483            )
15484        }
15485        __tmp.put_u8(self.target_system);
15486        __tmp.put_u8(self.target_component);
15487        __tmp.put_u8(self.mission_type as u8);
15488        if matches!(version, MavlinkVersion::V2) {
15489            let len = __tmp.len();
15490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15491        } else {
15492            __tmp.len()
15493        }
15494    }
15495}
15496#[doc = "id: 103"]
15497#[doc = "Speed estimate from a vision source."]
15498#[derive(Debug, Clone, PartialEq)]
15499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15501pub struct VISION_SPEED_ESTIMATE_DATA {
15502    #[doc = "Timestamp (UNIX time or time since system boot)"]
15503    pub usec: u64,
15504    #[doc = "Global X speed"]
15505    pub x: f32,
15506    #[doc = "Global Y speed"]
15507    pub y: f32,
15508    #[doc = "Global Z speed"]
15509    pub z: f32,
15510    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
15511    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15513    pub covariance: [f32; 9],
15514    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
15515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15516    pub reset_counter: u8,
15517}
15518impl VISION_SPEED_ESTIMATE_DATA {
15519    pub const ENCODED_LEN: usize = 57usize;
15520    pub const DEFAULT: Self = Self {
15521        usec: 0_u64,
15522        x: 0.0_f32,
15523        y: 0.0_f32,
15524        z: 0.0_f32,
15525        covariance: [0.0_f32; 9usize],
15526        reset_counter: 0_u8,
15527    };
15528    #[cfg(feature = "arbitrary")]
15529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15530        use arbitrary::{Arbitrary, Unstructured};
15531        let mut buf = [0u8; 1024];
15532        rng.fill_bytes(&mut buf);
15533        let mut unstructured = Unstructured::new(&buf);
15534        Self::arbitrary(&mut unstructured).unwrap_or_default()
15535    }
15536}
15537impl Default for VISION_SPEED_ESTIMATE_DATA {
15538    fn default() -> Self {
15539        Self::DEFAULT.clone()
15540    }
15541}
15542impl MessageData for VISION_SPEED_ESTIMATE_DATA {
15543    type Message = MavMessage;
15544    const ID: u32 = 103u32;
15545    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
15546    const EXTRA_CRC: u8 = 208u8;
15547    const ENCODED_LEN: usize = 57usize;
15548    fn deser(
15549        _version: MavlinkVersion,
15550        __input: &[u8],
15551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15552        let avail_len = __input.len();
15553        let mut payload_buf = [0; Self::ENCODED_LEN];
15554        let mut buf = if avail_len < Self::ENCODED_LEN {
15555            payload_buf[0..avail_len].copy_from_slice(__input);
15556            Bytes::new(&payload_buf)
15557        } else {
15558            Bytes::new(__input)
15559        };
15560        let mut __struct = Self::default();
15561        __struct.usec = buf.get_u64_le();
15562        __struct.x = buf.get_f32_le();
15563        __struct.y = buf.get_f32_le();
15564        __struct.z = buf.get_f32_le();
15565        for v in &mut __struct.covariance {
15566            let val = buf.get_f32_le();
15567            *v = val;
15568        }
15569        __struct.reset_counter = buf.get_u8();
15570        Ok(__struct)
15571    }
15572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15573        let mut __tmp = BytesMut::new(bytes);
15574        #[allow(clippy::absurd_extreme_comparisons)]
15575        #[allow(unused_comparisons)]
15576        if __tmp.remaining() < Self::ENCODED_LEN {
15577            panic!(
15578                "buffer is too small (need {} bytes, but got {})",
15579                Self::ENCODED_LEN,
15580                __tmp.remaining(),
15581            )
15582        }
15583        __tmp.put_u64_le(self.usec);
15584        __tmp.put_f32_le(self.x);
15585        __tmp.put_f32_le(self.y);
15586        __tmp.put_f32_le(self.z);
15587        for val in &self.covariance {
15588            __tmp.put_f32_le(*val);
15589        }
15590        __tmp.put_u8(self.reset_counter);
15591        if matches!(version, MavlinkVersion::V2) {
15592            let len = __tmp.len();
15593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15594        } else {
15595            __tmp.len()
15596        }
15597    }
15598}
15599#[doc = "id: 81"]
15600#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
15601#[derive(Debug, Clone, PartialEq)]
15602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15604pub struct MANUAL_SETPOINT_DATA {
15605    #[doc = "Timestamp (time since system boot)."]
15606    pub time_boot_ms: u32,
15607    #[doc = "Desired roll rate"]
15608    pub roll: f32,
15609    #[doc = "Desired pitch rate"]
15610    pub pitch: f32,
15611    #[doc = "Desired yaw rate"]
15612    pub yaw: f32,
15613    #[doc = "Collective thrust, normalized to 0 .. 1"]
15614    pub thrust: f32,
15615    #[doc = "Flight mode switch position, 0.. 255"]
15616    pub mode_switch: u8,
15617    #[doc = "Override mode switch position, 0.. 255"]
15618    pub manual_override_switch: u8,
15619}
15620impl MANUAL_SETPOINT_DATA {
15621    pub const ENCODED_LEN: usize = 22usize;
15622    pub const DEFAULT: Self = Self {
15623        time_boot_ms: 0_u32,
15624        roll: 0.0_f32,
15625        pitch: 0.0_f32,
15626        yaw: 0.0_f32,
15627        thrust: 0.0_f32,
15628        mode_switch: 0_u8,
15629        manual_override_switch: 0_u8,
15630    };
15631    #[cfg(feature = "arbitrary")]
15632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15633        use arbitrary::{Arbitrary, Unstructured};
15634        let mut buf = [0u8; 1024];
15635        rng.fill_bytes(&mut buf);
15636        let mut unstructured = Unstructured::new(&buf);
15637        Self::arbitrary(&mut unstructured).unwrap_or_default()
15638    }
15639}
15640impl Default for MANUAL_SETPOINT_DATA {
15641    fn default() -> Self {
15642        Self::DEFAULT.clone()
15643    }
15644}
15645impl MessageData for MANUAL_SETPOINT_DATA {
15646    type Message = MavMessage;
15647    const ID: u32 = 81u32;
15648    const NAME: &'static str = "MANUAL_SETPOINT";
15649    const EXTRA_CRC: u8 = 106u8;
15650    const ENCODED_LEN: usize = 22usize;
15651    fn deser(
15652        _version: MavlinkVersion,
15653        __input: &[u8],
15654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15655        let avail_len = __input.len();
15656        let mut payload_buf = [0; Self::ENCODED_LEN];
15657        let mut buf = if avail_len < Self::ENCODED_LEN {
15658            payload_buf[0..avail_len].copy_from_slice(__input);
15659            Bytes::new(&payload_buf)
15660        } else {
15661            Bytes::new(__input)
15662        };
15663        let mut __struct = Self::default();
15664        __struct.time_boot_ms = buf.get_u32_le();
15665        __struct.roll = buf.get_f32_le();
15666        __struct.pitch = buf.get_f32_le();
15667        __struct.yaw = buf.get_f32_le();
15668        __struct.thrust = buf.get_f32_le();
15669        __struct.mode_switch = buf.get_u8();
15670        __struct.manual_override_switch = buf.get_u8();
15671        Ok(__struct)
15672    }
15673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15674        let mut __tmp = BytesMut::new(bytes);
15675        #[allow(clippy::absurd_extreme_comparisons)]
15676        #[allow(unused_comparisons)]
15677        if __tmp.remaining() < Self::ENCODED_LEN {
15678            panic!(
15679                "buffer is too small (need {} bytes, but got {})",
15680                Self::ENCODED_LEN,
15681                __tmp.remaining(),
15682            )
15683        }
15684        __tmp.put_u32_le(self.time_boot_ms);
15685        __tmp.put_f32_le(self.roll);
15686        __tmp.put_f32_le(self.pitch);
15687        __tmp.put_f32_le(self.yaw);
15688        __tmp.put_f32_le(self.thrust);
15689        __tmp.put_u8(self.mode_switch);
15690        __tmp.put_u8(self.manual_override_switch);
15691        if matches!(version, MavlinkVersion::V2) {
15692            let len = __tmp.len();
15693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15694        } else {
15695            __tmp.len()
15696        }
15697    }
15698}
15699#[doc = "id: 323"]
15700#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
15701#[derive(Debug, Clone, PartialEq)]
15702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15704pub struct PARAM_EXT_SET_DATA {
15705    #[doc = "System ID"]
15706    pub target_system: u8,
15707    #[doc = "Component ID"]
15708    pub target_component: u8,
15709    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
15710    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15711    pub param_id: [u8; 16],
15712    #[doc = "Parameter value"]
15713    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15714    pub param_value: [u8; 128],
15715    #[doc = "Parameter type."]
15716    pub param_type: MavParamExtType,
15717}
15718impl PARAM_EXT_SET_DATA {
15719    pub const ENCODED_LEN: usize = 147usize;
15720    pub const DEFAULT: Self = Self {
15721        target_system: 0_u8,
15722        target_component: 0_u8,
15723        param_id: [0_u8; 16usize],
15724        param_value: [0_u8; 128usize],
15725        param_type: MavParamExtType::DEFAULT,
15726    };
15727    #[cfg(feature = "arbitrary")]
15728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15729        use arbitrary::{Arbitrary, Unstructured};
15730        let mut buf = [0u8; 1024];
15731        rng.fill_bytes(&mut buf);
15732        let mut unstructured = Unstructured::new(&buf);
15733        Self::arbitrary(&mut unstructured).unwrap_or_default()
15734    }
15735}
15736impl Default for PARAM_EXT_SET_DATA {
15737    fn default() -> Self {
15738        Self::DEFAULT.clone()
15739    }
15740}
15741impl MessageData for PARAM_EXT_SET_DATA {
15742    type Message = MavMessage;
15743    const ID: u32 = 323u32;
15744    const NAME: &'static str = "PARAM_EXT_SET";
15745    const EXTRA_CRC: u8 = 78u8;
15746    const ENCODED_LEN: usize = 147usize;
15747    fn deser(
15748        _version: MavlinkVersion,
15749        __input: &[u8],
15750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15751        let avail_len = __input.len();
15752        let mut payload_buf = [0; Self::ENCODED_LEN];
15753        let mut buf = if avail_len < Self::ENCODED_LEN {
15754            payload_buf[0..avail_len].copy_from_slice(__input);
15755            Bytes::new(&payload_buf)
15756        } else {
15757            Bytes::new(__input)
15758        };
15759        let mut __struct = Self::default();
15760        __struct.target_system = buf.get_u8();
15761        __struct.target_component = buf.get_u8();
15762        for v in &mut __struct.param_id {
15763            let val = buf.get_u8();
15764            *v = val;
15765        }
15766        for v in &mut __struct.param_value {
15767            let val = buf.get_u8();
15768            *v = val;
15769        }
15770        let tmp = buf.get_u8();
15771        __struct.param_type =
15772            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15773                enum_type: "MavParamExtType",
15774                value: tmp as u32,
15775            })?;
15776        Ok(__struct)
15777    }
15778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15779        let mut __tmp = BytesMut::new(bytes);
15780        #[allow(clippy::absurd_extreme_comparisons)]
15781        #[allow(unused_comparisons)]
15782        if __tmp.remaining() < Self::ENCODED_LEN {
15783            panic!(
15784                "buffer is too small (need {} bytes, but got {})",
15785                Self::ENCODED_LEN,
15786                __tmp.remaining(),
15787            )
15788        }
15789        __tmp.put_u8(self.target_system);
15790        __tmp.put_u8(self.target_component);
15791        for val in &self.param_id {
15792            __tmp.put_u8(*val);
15793        }
15794        for val in &self.param_value {
15795            __tmp.put_u8(*val);
15796        }
15797        __tmp.put_u8(self.param_type as u8);
15798        if matches!(version, MavlinkVersion::V2) {
15799            let len = __tmp.len();
15800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15801        } else {
15802            __tmp.len()
15803        }
15804    }
15805}
15806#[doc = "id: 32"]
15807#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
15808#[derive(Debug, Clone, PartialEq)]
15809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15811pub struct LOCAL_POSITION_NED_DATA {
15812    #[doc = "Timestamp (time since system boot)."]
15813    pub time_boot_ms: u32,
15814    #[doc = "X Position"]
15815    pub x: f32,
15816    #[doc = "Y Position"]
15817    pub y: f32,
15818    #[doc = "Z Position"]
15819    pub z: f32,
15820    #[doc = "X Speed"]
15821    pub vx: f32,
15822    #[doc = "Y Speed"]
15823    pub vy: f32,
15824    #[doc = "Z Speed"]
15825    pub vz: f32,
15826}
15827impl LOCAL_POSITION_NED_DATA {
15828    pub const ENCODED_LEN: usize = 28usize;
15829    pub const DEFAULT: Self = Self {
15830        time_boot_ms: 0_u32,
15831        x: 0.0_f32,
15832        y: 0.0_f32,
15833        z: 0.0_f32,
15834        vx: 0.0_f32,
15835        vy: 0.0_f32,
15836        vz: 0.0_f32,
15837    };
15838    #[cfg(feature = "arbitrary")]
15839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15840        use arbitrary::{Arbitrary, Unstructured};
15841        let mut buf = [0u8; 1024];
15842        rng.fill_bytes(&mut buf);
15843        let mut unstructured = Unstructured::new(&buf);
15844        Self::arbitrary(&mut unstructured).unwrap_or_default()
15845    }
15846}
15847impl Default for LOCAL_POSITION_NED_DATA {
15848    fn default() -> Self {
15849        Self::DEFAULT.clone()
15850    }
15851}
15852impl MessageData for LOCAL_POSITION_NED_DATA {
15853    type Message = MavMessage;
15854    const ID: u32 = 32u32;
15855    const NAME: &'static str = "LOCAL_POSITION_NED";
15856    const EXTRA_CRC: u8 = 185u8;
15857    const ENCODED_LEN: usize = 28usize;
15858    fn deser(
15859        _version: MavlinkVersion,
15860        __input: &[u8],
15861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15862        let avail_len = __input.len();
15863        let mut payload_buf = [0; Self::ENCODED_LEN];
15864        let mut buf = if avail_len < Self::ENCODED_LEN {
15865            payload_buf[0..avail_len].copy_from_slice(__input);
15866            Bytes::new(&payload_buf)
15867        } else {
15868            Bytes::new(__input)
15869        };
15870        let mut __struct = Self::default();
15871        __struct.time_boot_ms = buf.get_u32_le();
15872        __struct.x = buf.get_f32_le();
15873        __struct.y = buf.get_f32_le();
15874        __struct.z = buf.get_f32_le();
15875        __struct.vx = buf.get_f32_le();
15876        __struct.vy = buf.get_f32_le();
15877        __struct.vz = buf.get_f32_le();
15878        Ok(__struct)
15879    }
15880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15881        let mut __tmp = BytesMut::new(bytes);
15882        #[allow(clippy::absurd_extreme_comparisons)]
15883        #[allow(unused_comparisons)]
15884        if __tmp.remaining() < Self::ENCODED_LEN {
15885            panic!(
15886                "buffer is too small (need {} bytes, but got {})",
15887                Self::ENCODED_LEN,
15888                __tmp.remaining(),
15889            )
15890        }
15891        __tmp.put_u32_le(self.time_boot_ms);
15892        __tmp.put_f32_le(self.x);
15893        __tmp.put_f32_le(self.y);
15894        __tmp.put_f32_le(self.z);
15895        __tmp.put_f32_le(self.vx);
15896        __tmp.put_f32_le(self.vy);
15897        __tmp.put_f32_le(self.vz);
15898        if matches!(version, MavlinkVersion::V2) {
15899            let len = __tmp.len();
15900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15901        } else {
15902            __tmp.len()
15903        }
15904    }
15905}
15906#[doc = "id: 90"]
15907#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
15908#[derive(Debug, Clone, PartialEq)]
15909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15911pub struct HIL_STATE_DATA {
15912    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15913    pub time_usec: u64,
15914    #[doc = "Roll angle"]
15915    pub roll: f32,
15916    #[doc = "Pitch angle"]
15917    pub pitch: f32,
15918    #[doc = "Yaw angle"]
15919    pub yaw: f32,
15920    #[doc = "Body frame roll / phi angular speed"]
15921    pub rollspeed: f32,
15922    #[doc = "Body frame pitch / theta angular speed"]
15923    pub pitchspeed: f32,
15924    #[doc = "Body frame yaw / psi angular speed"]
15925    pub yawspeed: f32,
15926    #[doc = "Latitude"]
15927    pub lat: i32,
15928    #[doc = "Longitude"]
15929    pub lon: i32,
15930    #[doc = "Altitude"]
15931    pub alt: i32,
15932    #[doc = "Ground X Speed (Latitude)"]
15933    pub vx: i16,
15934    #[doc = "Ground Y Speed (Longitude)"]
15935    pub vy: i16,
15936    #[doc = "Ground Z Speed (Altitude)"]
15937    pub vz: i16,
15938    #[doc = "X acceleration"]
15939    pub xacc: i16,
15940    #[doc = "Y acceleration"]
15941    pub yacc: i16,
15942    #[doc = "Z acceleration"]
15943    pub zacc: i16,
15944}
15945impl HIL_STATE_DATA {
15946    pub const ENCODED_LEN: usize = 56usize;
15947    pub const DEFAULT: Self = Self {
15948        time_usec: 0_u64,
15949        roll: 0.0_f32,
15950        pitch: 0.0_f32,
15951        yaw: 0.0_f32,
15952        rollspeed: 0.0_f32,
15953        pitchspeed: 0.0_f32,
15954        yawspeed: 0.0_f32,
15955        lat: 0_i32,
15956        lon: 0_i32,
15957        alt: 0_i32,
15958        vx: 0_i16,
15959        vy: 0_i16,
15960        vz: 0_i16,
15961        xacc: 0_i16,
15962        yacc: 0_i16,
15963        zacc: 0_i16,
15964    };
15965    #[cfg(feature = "arbitrary")]
15966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15967        use arbitrary::{Arbitrary, Unstructured};
15968        let mut buf = [0u8; 1024];
15969        rng.fill_bytes(&mut buf);
15970        let mut unstructured = Unstructured::new(&buf);
15971        Self::arbitrary(&mut unstructured).unwrap_or_default()
15972    }
15973}
15974impl Default for HIL_STATE_DATA {
15975    fn default() -> Self {
15976        Self::DEFAULT.clone()
15977    }
15978}
15979impl MessageData for HIL_STATE_DATA {
15980    type Message = MavMessage;
15981    const ID: u32 = 90u32;
15982    const NAME: &'static str = "HIL_STATE";
15983    const EXTRA_CRC: u8 = 183u8;
15984    const ENCODED_LEN: usize = 56usize;
15985    fn deser(
15986        _version: MavlinkVersion,
15987        __input: &[u8],
15988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15989        let avail_len = __input.len();
15990        let mut payload_buf = [0; Self::ENCODED_LEN];
15991        let mut buf = if avail_len < Self::ENCODED_LEN {
15992            payload_buf[0..avail_len].copy_from_slice(__input);
15993            Bytes::new(&payload_buf)
15994        } else {
15995            Bytes::new(__input)
15996        };
15997        let mut __struct = Self::default();
15998        __struct.time_usec = buf.get_u64_le();
15999        __struct.roll = buf.get_f32_le();
16000        __struct.pitch = buf.get_f32_le();
16001        __struct.yaw = buf.get_f32_le();
16002        __struct.rollspeed = buf.get_f32_le();
16003        __struct.pitchspeed = buf.get_f32_le();
16004        __struct.yawspeed = buf.get_f32_le();
16005        __struct.lat = buf.get_i32_le();
16006        __struct.lon = buf.get_i32_le();
16007        __struct.alt = buf.get_i32_le();
16008        __struct.vx = buf.get_i16_le();
16009        __struct.vy = buf.get_i16_le();
16010        __struct.vz = buf.get_i16_le();
16011        __struct.xacc = buf.get_i16_le();
16012        __struct.yacc = buf.get_i16_le();
16013        __struct.zacc = buf.get_i16_le();
16014        Ok(__struct)
16015    }
16016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16017        let mut __tmp = BytesMut::new(bytes);
16018        #[allow(clippy::absurd_extreme_comparisons)]
16019        #[allow(unused_comparisons)]
16020        if __tmp.remaining() < Self::ENCODED_LEN {
16021            panic!(
16022                "buffer is too small (need {} bytes, but got {})",
16023                Self::ENCODED_LEN,
16024                __tmp.remaining(),
16025            )
16026        }
16027        __tmp.put_u64_le(self.time_usec);
16028        __tmp.put_f32_le(self.roll);
16029        __tmp.put_f32_le(self.pitch);
16030        __tmp.put_f32_le(self.yaw);
16031        __tmp.put_f32_le(self.rollspeed);
16032        __tmp.put_f32_le(self.pitchspeed);
16033        __tmp.put_f32_le(self.yawspeed);
16034        __tmp.put_i32_le(self.lat);
16035        __tmp.put_i32_le(self.lon);
16036        __tmp.put_i32_le(self.alt);
16037        __tmp.put_i16_le(self.vx);
16038        __tmp.put_i16_le(self.vy);
16039        __tmp.put_i16_le(self.vz);
16040        __tmp.put_i16_le(self.xacc);
16041        __tmp.put_i16_le(self.yacc);
16042        __tmp.put_i16_le(self.zacc);
16043        if matches!(version, MavlinkVersion::V2) {
16044            let len = __tmp.len();
16045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16046        } else {
16047            __tmp.len()
16048        }
16049    }
16050}
16051#[doc = "id: 28"]
16052#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
16053#[derive(Debug, Clone, PartialEq)]
16054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16056pub struct RAW_PRESSURE_DATA {
16057    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16058    pub time_usec: u64,
16059    #[doc = "Absolute pressure (raw)"]
16060    pub press_abs: i16,
16061    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
16062    pub press_diff1: i16,
16063    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
16064    pub press_diff2: i16,
16065    #[doc = "Raw Temperature measurement (raw)"]
16066    pub temperature: i16,
16067}
16068impl RAW_PRESSURE_DATA {
16069    pub const ENCODED_LEN: usize = 16usize;
16070    pub const DEFAULT: Self = Self {
16071        time_usec: 0_u64,
16072        press_abs: 0_i16,
16073        press_diff1: 0_i16,
16074        press_diff2: 0_i16,
16075        temperature: 0_i16,
16076    };
16077    #[cfg(feature = "arbitrary")]
16078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16079        use arbitrary::{Arbitrary, Unstructured};
16080        let mut buf = [0u8; 1024];
16081        rng.fill_bytes(&mut buf);
16082        let mut unstructured = Unstructured::new(&buf);
16083        Self::arbitrary(&mut unstructured).unwrap_or_default()
16084    }
16085}
16086impl Default for RAW_PRESSURE_DATA {
16087    fn default() -> Self {
16088        Self::DEFAULT.clone()
16089    }
16090}
16091impl MessageData for RAW_PRESSURE_DATA {
16092    type Message = MavMessage;
16093    const ID: u32 = 28u32;
16094    const NAME: &'static str = "RAW_PRESSURE";
16095    const EXTRA_CRC: u8 = 67u8;
16096    const ENCODED_LEN: usize = 16usize;
16097    fn deser(
16098        _version: MavlinkVersion,
16099        __input: &[u8],
16100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16101        let avail_len = __input.len();
16102        let mut payload_buf = [0; Self::ENCODED_LEN];
16103        let mut buf = if avail_len < Self::ENCODED_LEN {
16104            payload_buf[0..avail_len].copy_from_slice(__input);
16105            Bytes::new(&payload_buf)
16106        } else {
16107            Bytes::new(__input)
16108        };
16109        let mut __struct = Self::default();
16110        __struct.time_usec = buf.get_u64_le();
16111        __struct.press_abs = buf.get_i16_le();
16112        __struct.press_diff1 = buf.get_i16_le();
16113        __struct.press_diff2 = buf.get_i16_le();
16114        __struct.temperature = buf.get_i16_le();
16115        Ok(__struct)
16116    }
16117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16118        let mut __tmp = BytesMut::new(bytes);
16119        #[allow(clippy::absurd_extreme_comparisons)]
16120        #[allow(unused_comparisons)]
16121        if __tmp.remaining() < Self::ENCODED_LEN {
16122            panic!(
16123                "buffer is too small (need {} bytes, but got {})",
16124                Self::ENCODED_LEN,
16125                __tmp.remaining(),
16126            )
16127        }
16128        __tmp.put_u64_le(self.time_usec);
16129        __tmp.put_i16_le(self.press_abs);
16130        __tmp.put_i16_le(self.press_diff1);
16131        __tmp.put_i16_le(self.press_diff2);
16132        __tmp.put_i16_le(self.temperature);
16133        if matches!(version, MavlinkVersion::V2) {
16134            let len = __tmp.len();
16135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16136        } else {
16137            __tmp.len()
16138        }
16139    }
16140}
16141#[doc = "id: 140"]
16142#[doc = "Set the vehicle attitude and body angular rates."]
16143#[derive(Debug, Clone, PartialEq)]
16144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16146pub struct ACTUATOR_CONTROL_TARGET_DATA {
16147    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16148    pub time_usec: u64,
16149    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
16150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16151    pub controls: [f32; 8],
16152    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
16153    pub group_mlx: u8,
16154}
16155impl ACTUATOR_CONTROL_TARGET_DATA {
16156    pub const ENCODED_LEN: usize = 41usize;
16157    pub const DEFAULT: Self = Self {
16158        time_usec: 0_u64,
16159        controls: [0.0_f32; 8usize],
16160        group_mlx: 0_u8,
16161    };
16162    #[cfg(feature = "arbitrary")]
16163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16164        use arbitrary::{Arbitrary, Unstructured};
16165        let mut buf = [0u8; 1024];
16166        rng.fill_bytes(&mut buf);
16167        let mut unstructured = Unstructured::new(&buf);
16168        Self::arbitrary(&mut unstructured).unwrap_or_default()
16169    }
16170}
16171impl Default for ACTUATOR_CONTROL_TARGET_DATA {
16172    fn default() -> Self {
16173        Self::DEFAULT.clone()
16174    }
16175}
16176impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
16177    type Message = MavMessage;
16178    const ID: u32 = 140u32;
16179    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
16180    const EXTRA_CRC: u8 = 181u8;
16181    const ENCODED_LEN: usize = 41usize;
16182    fn deser(
16183        _version: MavlinkVersion,
16184        __input: &[u8],
16185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16186        let avail_len = __input.len();
16187        let mut payload_buf = [0; Self::ENCODED_LEN];
16188        let mut buf = if avail_len < Self::ENCODED_LEN {
16189            payload_buf[0..avail_len].copy_from_slice(__input);
16190            Bytes::new(&payload_buf)
16191        } else {
16192            Bytes::new(__input)
16193        };
16194        let mut __struct = Self::default();
16195        __struct.time_usec = buf.get_u64_le();
16196        for v in &mut __struct.controls {
16197            let val = buf.get_f32_le();
16198            *v = val;
16199        }
16200        __struct.group_mlx = buf.get_u8();
16201        Ok(__struct)
16202    }
16203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16204        let mut __tmp = BytesMut::new(bytes);
16205        #[allow(clippy::absurd_extreme_comparisons)]
16206        #[allow(unused_comparisons)]
16207        if __tmp.remaining() < Self::ENCODED_LEN {
16208            panic!(
16209                "buffer is too small (need {} bytes, but got {})",
16210                Self::ENCODED_LEN,
16211                __tmp.remaining(),
16212            )
16213        }
16214        __tmp.put_u64_le(self.time_usec);
16215        for val in &self.controls {
16216            __tmp.put_f32_le(*val);
16217        }
16218        __tmp.put_u8(self.group_mlx);
16219        if matches!(version, MavlinkVersion::V2) {
16220            let len = __tmp.len();
16221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16222        } else {
16223            __tmp.len()
16224        }
16225    }
16226}
16227#[doc = "id: 109"]
16228#[doc = "Status generated by radio and injected into MAVLink stream."]
16229#[derive(Debug, Clone, PartialEq)]
16230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16232pub struct RADIO_STATUS_DATA {
16233    #[doc = "Count of radio packet receive errors (since boot)."]
16234    pub rxerrors: u16,
16235    #[doc = "Count of error corrected radio packets (since boot)."]
16236    pub fixed: u16,
16237    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16238    pub rssi: u8,
16239    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16240    pub remrssi: u8,
16241    #[doc = "Remaining free transmitter buffer space."]
16242    pub txbuf: u8,
16243    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
16244    pub noise: u8,
16245    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
16246    pub remnoise: u8,
16247}
16248impl RADIO_STATUS_DATA {
16249    pub const ENCODED_LEN: usize = 9usize;
16250    pub const DEFAULT: Self = Self {
16251        rxerrors: 0_u16,
16252        fixed: 0_u16,
16253        rssi: 0_u8,
16254        remrssi: 0_u8,
16255        txbuf: 0_u8,
16256        noise: 0_u8,
16257        remnoise: 0_u8,
16258    };
16259    #[cfg(feature = "arbitrary")]
16260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16261        use arbitrary::{Arbitrary, Unstructured};
16262        let mut buf = [0u8; 1024];
16263        rng.fill_bytes(&mut buf);
16264        let mut unstructured = Unstructured::new(&buf);
16265        Self::arbitrary(&mut unstructured).unwrap_or_default()
16266    }
16267}
16268impl Default for RADIO_STATUS_DATA {
16269    fn default() -> Self {
16270        Self::DEFAULT.clone()
16271    }
16272}
16273impl MessageData for RADIO_STATUS_DATA {
16274    type Message = MavMessage;
16275    const ID: u32 = 109u32;
16276    const NAME: &'static str = "RADIO_STATUS";
16277    const EXTRA_CRC: u8 = 185u8;
16278    const ENCODED_LEN: usize = 9usize;
16279    fn deser(
16280        _version: MavlinkVersion,
16281        __input: &[u8],
16282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16283        let avail_len = __input.len();
16284        let mut payload_buf = [0; Self::ENCODED_LEN];
16285        let mut buf = if avail_len < Self::ENCODED_LEN {
16286            payload_buf[0..avail_len].copy_from_slice(__input);
16287            Bytes::new(&payload_buf)
16288        } else {
16289            Bytes::new(__input)
16290        };
16291        let mut __struct = Self::default();
16292        __struct.rxerrors = buf.get_u16_le();
16293        __struct.fixed = buf.get_u16_le();
16294        __struct.rssi = buf.get_u8();
16295        __struct.remrssi = buf.get_u8();
16296        __struct.txbuf = buf.get_u8();
16297        __struct.noise = buf.get_u8();
16298        __struct.remnoise = buf.get_u8();
16299        Ok(__struct)
16300    }
16301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16302        let mut __tmp = BytesMut::new(bytes);
16303        #[allow(clippy::absurd_extreme_comparisons)]
16304        #[allow(unused_comparisons)]
16305        if __tmp.remaining() < Self::ENCODED_LEN {
16306            panic!(
16307                "buffer is too small (need {} bytes, but got {})",
16308                Self::ENCODED_LEN,
16309                __tmp.remaining(),
16310            )
16311        }
16312        __tmp.put_u16_le(self.rxerrors);
16313        __tmp.put_u16_le(self.fixed);
16314        __tmp.put_u8(self.rssi);
16315        __tmp.put_u8(self.remrssi);
16316        __tmp.put_u8(self.txbuf);
16317        __tmp.put_u8(self.noise);
16318        __tmp.put_u8(self.remnoise);
16319        if matches!(version, MavlinkVersion::V2) {
16320            let len = __tmp.len();
16321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16322        } else {
16323            __tmp.len()
16324        }
16325    }
16326}
16327#[doc = "id: 47"]
16328#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
16329#[derive(Debug, Clone, PartialEq)]
16330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16332pub struct MISSION_ACK_DATA {
16333    #[doc = "System ID"]
16334    pub target_system: u8,
16335    #[doc = "Component ID"]
16336    pub target_component: u8,
16337    #[doc = "Mission result."]
16338    pub mavtype: MavMissionResult,
16339    #[doc = "Mission type."]
16340    #[cfg_attr(feature = "serde", serde(default))]
16341    pub mission_type: MavMissionType,
16342    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
16343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16344    pub opaque_id: u32,
16345}
16346impl MISSION_ACK_DATA {
16347    pub const ENCODED_LEN: usize = 8usize;
16348    pub const DEFAULT: Self = Self {
16349        target_system: 0_u8,
16350        target_component: 0_u8,
16351        mavtype: MavMissionResult::DEFAULT,
16352        mission_type: MavMissionType::DEFAULT,
16353        opaque_id: 0_u32,
16354    };
16355    #[cfg(feature = "arbitrary")]
16356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16357        use arbitrary::{Arbitrary, Unstructured};
16358        let mut buf = [0u8; 1024];
16359        rng.fill_bytes(&mut buf);
16360        let mut unstructured = Unstructured::new(&buf);
16361        Self::arbitrary(&mut unstructured).unwrap_or_default()
16362    }
16363}
16364impl Default for MISSION_ACK_DATA {
16365    fn default() -> Self {
16366        Self::DEFAULT.clone()
16367    }
16368}
16369impl MessageData for MISSION_ACK_DATA {
16370    type Message = MavMessage;
16371    const ID: u32 = 47u32;
16372    const NAME: &'static str = "MISSION_ACK";
16373    const EXTRA_CRC: u8 = 153u8;
16374    const ENCODED_LEN: usize = 8usize;
16375    fn deser(
16376        _version: MavlinkVersion,
16377        __input: &[u8],
16378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16379        let avail_len = __input.len();
16380        let mut payload_buf = [0; Self::ENCODED_LEN];
16381        let mut buf = if avail_len < Self::ENCODED_LEN {
16382            payload_buf[0..avail_len].copy_from_slice(__input);
16383            Bytes::new(&payload_buf)
16384        } else {
16385            Bytes::new(__input)
16386        };
16387        let mut __struct = Self::default();
16388        __struct.target_system = buf.get_u8();
16389        __struct.target_component = buf.get_u8();
16390        let tmp = buf.get_u8();
16391        __struct.mavtype =
16392            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16393                enum_type: "MavMissionResult",
16394                value: tmp as u32,
16395            })?;
16396        let tmp = buf.get_u8();
16397        __struct.mission_type =
16398            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16399                enum_type: "MavMissionType",
16400                value: tmp as u32,
16401            })?;
16402        __struct.opaque_id = buf.get_u32_le();
16403        Ok(__struct)
16404    }
16405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16406        let mut __tmp = BytesMut::new(bytes);
16407        #[allow(clippy::absurd_extreme_comparisons)]
16408        #[allow(unused_comparisons)]
16409        if __tmp.remaining() < Self::ENCODED_LEN {
16410            panic!(
16411                "buffer is too small (need {} bytes, but got {})",
16412                Self::ENCODED_LEN,
16413                __tmp.remaining(),
16414            )
16415        }
16416        __tmp.put_u8(self.target_system);
16417        __tmp.put_u8(self.target_component);
16418        __tmp.put_u8(self.mavtype as u8);
16419        __tmp.put_u8(self.mission_type as u8);
16420        __tmp.put_u32_le(self.opaque_id);
16421        if matches!(version, MavlinkVersion::V2) {
16422            let len = __tmp.len();
16423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16424        } else {
16425            __tmp.len()
16426        }
16427    }
16428}
16429#[doc = "id: 126"]
16430#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
16431#[derive(Debug, Clone, PartialEq)]
16432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16434pub struct SERIAL_CONTROL_DATA {
16435    #[doc = "Baudrate of transfer. Zero means no change."]
16436    pub baudrate: u32,
16437    #[doc = "Timeout for reply data"]
16438    pub timeout: u16,
16439    #[doc = "Serial control device type."]
16440    pub device: SerialControlDev,
16441    #[doc = "Bitmap of serial control flags."]
16442    pub flags: SerialControlFlag,
16443    #[doc = "how many bytes in this transfer"]
16444    pub count: u8,
16445    #[doc = "serial data"]
16446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16447    pub data: [u8; 70],
16448    #[doc = "System ID"]
16449    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16450    pub target_system: u8,
16451    #[doc = "Component ID"]
16452    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16453    pub target_component: u8,
16454}
16455impl SERIAL_CONTROL_DATA {
16456    pub const ENCODED_LEN: usize = 81usize;
16457    pub const DEFAULT: Self = Self {
16458        baudrate: 0_u32,
16459        timeout: 0_u16,
16460        device: SerialControlDev::DEFAULT,
16461        flags: SerialControlFlag::DEFAULT,
16462        count: 0_u8,
16463        data: [0_u8; 70usize],
16464        target_system: 0_u8,
16465        target_component: 0_u8,
16466    };
16467    #[cfg(feature = "arbitrary")]
16468    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16469        use arbitrary::{Arbitrary, Unstructured};
16470        let mut buf = [0u8; 1024];
16471        rng.fill_bytes(&mut buf);
16472        let mut unstructured = Unstructured::new(&buf);
16473        Self::arbitrary(&mut unstructured).unwrap_or_default()
16474    }
16475}
16476impl Default for SERIAL_CONTROL_DATA {
16477    fn default() -> Self {
16478        Self::DEFAULT.clone()
16479    }
16480}
16481impl MessageData for SERIAL_CONTROL_DATA {
16482    type Message = MavMessage;
16483    const ID: u32 = 126u32;
16484    const NAME: &'static str = "SERIAL_CONTROL";
16485    const EXTRA_CRC: u8 = 220u8;
16486    const ENCODED_LEN: usize = 81usize;
16487    fn deser(
16488        _version: MavlinkVersion,
16489        __input: &[u8],
16490    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16491        let avail_len = __input.len();
16492        let mut payload_buf = [0; Self::ENCODED_LEN];
16493        let mut buf = if avail_len < Self::ENCODED_LEN {
16494            payload_buf[0..avail_len].copy_from_slice(__input);
16495            Bytes::new(&payload_buf)
16496        } else {
16497            Bytes::new(__input)
16498        };
16499        let mut __struct = Self::default();
16500        __struct.baudrate = buf.get_u32_le();
16501        __struct.timeout = buf.get_u16_le();
16502        let tmp = buf.get_u8();
16503        __struct.device =
16504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16505                enum_type: "SerialControlDev",
16506                value: tmp as u32,
16507            })?;
16508        let tmp = buf.get_u8();
16509        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
16510            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16511                flag_type: "SerialControlFlag",
16512                value: tmp as u32,
16513            })?;
16514        __struct.count = buf.get_u8();
16515        for v in &mut __struct.data {
16516            let val = buf.get_u8();
16517            *v = val;
16518        }
16519        __struct.target_system = buf.get_u8();
16520        __struct.target_component = buf.get_u8();
16521        Ok(__struct)
16522    }
16523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16524        let mut __tmp = BytesMut::new(bytes);
16525        #[allow(clippy::absurd_extreme_comparisons)]
16526        #[allow(unused_comparisons)]
16527        if __tmp.remaining() < Self::ENCODED_LEN {
16528            panic!(
16529                "buffer is too small (need {} bytes, but got {})",
16530                Self::ENCODED_LEN,
16531                __tmp.remaining(),
16532            )
16533        }
16534        __tmp.put_u32_le(self.baudrate);
16535        __tmp.put_u16_le(self.timeout);
16536        __tmp.put_u8(self.device as u8);
16537        __tmp.put_u8(self.flags.bits());
16538        __tmp.put_u8(self.count);
16539        for val in &self.data {
16540            __tmp.put_u8(*val);
16541        }
16542        __tmp.put_u8(self.target_system);
16543        __tmp.put_u8(self.target_component);
16544        if matches!(version, MavlinkVersion::V2) {
16545            let len = __tmp.len();
16546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16547        } else {
16548            __tmp.len()
16549        }
16550    }
16551}
16552#[doc = "id: 360"]
16553#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
16554#[derive(Debug, Clone, PartialEq)]
16555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16557pub struct ORBIT_EXECUTION_STATUS_DATA {
16558    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16559    pub time_usec: u64,
16560    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
16561    pub radius: f32,
16562    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
16563    pub x: i32,
16564    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
16565    pub y: i32,
16566    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
16567    pub z: f32,
16568    #[doc = "The coordinate system of the fields: x, y, z."]
16569    pub frame: MavFrame,
16570}
16571impl ORBIT_EXECUTION_STATUS_DATA {
16572    pub const ENCODED_LEN: usize = 25usize;
16573    pub const DEFAULT: Self = Self {
16574        time_usec: 0_u64,
16575        radius: 0.0_f32,
16576        x: 0_i32,
16577        y: 0_i32,
16578        z: 0.0_f32,
16579        frame: MavFrame::DEFAULT,
16580    };
16581    #[cfg(feature = "arbitrary")]
16582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16583        use arbitrary::{Arbitrary, Unstructured};
16584        let mut buf = [0u8; 1024];
16585        rng.fill_bytes(&mut buf);
16586        let mut unstructured = Unstructured::new(&buf);
16587        Self::arbitrary(&mut unstructured).unwrap_or_default()
16588    }
16589}
16590impl Default for ORBIT_EXECUTION_STATUS_DATA {
16591    fn default() -> Self {
16592        Self::DEFAULT.clone()
16593    }
16594}
16595impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
16596    type Message = MavMessage;
16597    const ID: u32 = 360u32;
16598    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
16599    const EXTRA_CRC: u8 = 11u8;
16600    const ENCODED_LEN: usize = 25usize;
16601    fn deser(
16602        _version: MavlinkVersion,
16603        __input: &[u8],
16604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16605        let avail_len = __input.len();
16606        let mut payload_buf = [0; Self::ENCODED_LEN];
16607        let mut buf = if avail_len < Self::ENCODED_LEN {
16608            payload_buf[0..avail_len].copy_from_slice(__input);
16609            Bytes::new(&payload_buf)
16610        } else {
16611            Bytes::new(__input)
16612        };
16613        let mut __struct = Self::default();
16614        __struct.time_usec = buf.get_u64_le();
16615        __struct.radius = buf.get_f32_le();
16616        __struct.x = buf.get_i32_le();
16617        __struct.y = buf.get_i32_le();
16618        __struct.z = buf.get_f32_le();
16619        let tmp = buf.get_u8();
16620        __struct.frame =
16621            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16622                enum_type: "MavFrame",
16623                value: tmp as u32,
16624            })?;
16625        Ok(__struct)
16626    }
16627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16628        let mut __tmp = BytesMut::new(bytes);
16629        #[allow(clippy::absurd_extreme_comparisons)]
16630        #[allow(unused_comparisons)]
16631        if __tmp.remaining() < Self::ENCODED_LEN {
16632            panic!(
16633                "buffer is too small (need {} bytes, but got {})",
16634                Self::ENCODED_LEN,
16635                __tmp.remaining(),
16636            )
16637        }
16638        __tmp.put_u64_le(self.time_usec);
16639        __tmp.put_f32_le(self.radius);
16640        __tmp.put_i32_le(self.x);
16641        __tmp.put_i32_le(self.y);
16642        __tmp.put_f32_le(self.z);
16643        __tmp.put_u8(self.frame as u8);
16644        if matches!(version, MavlinkVersion::V2) {
16645            let len = __tmp.len();
16646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16647        } else {
16648            __tmp.len()
16649        }
16650    }
16651}
16652#[doc = "id: 36"]
16653#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
16654#[derive(Debug, Clone, PartialEq)]
16655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16657pub struct SERVO_OUTPUT_RAW_DATA {
16658    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16659    pub time_usec: u32,
16660    #[doc = "Servo output 1 value"]
16661    pub servo1_raw: u16,
16662    #[doc = "Servo output 2 value"]
16663    pub servo2_raw: u16,
16664    #[doc = "Servo output 3 value"]
16665    pub servo3_raw: u16,
16666    #[doc = "Servo output 4 value"]
16667    pub servo4_raw: u16,
16668    #[doc = "Servo output 5 value"]
16669    pub servo5_raw: u16,
16670    #[doc = "Servo output 6 value"]
16671    pub servo6_raw: u16,
16672    #[doc = "Servo output 7 value"]
16673    pub servo7_raw: u16,
16674    #[doc = "Servo output 8 value"]
16675    pub servo8_raw: u16,
16676    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
16677    pub port: u8,
16678    #[doc = "Servo output 9 value"]
16679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16680    pub servo9_raw: u16,
16681    #[doc = "Servo output 10 value"]
16682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16683    pub servo10_raw: u16,
16684    #[doc = "Servo output 11 value"]
16685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16686    pub servo11_raw: u16,
16687    #[doc = "Servo output 12 value"]
16688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16689    pub servo12_raw: u16,
16690    #[doc = "Servo output 13 value"]
16691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16692    pub servo13_raw: u16,
16693    #[doc = "Servo output 14 value"]
16694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16695    pub servo14_raw: u16,
16696    #[doc = "Servo output 15 value"]
16697    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16698    pub servo15_raw: u16,
16699    #[doc = "Servo output 16 value"]
16700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16701    pub servo16_raw: u16,
16702}
16703impl SERVO_OUTPUT_RAW_DATA {
16704    pub const ENCODED_LEN: usize = 37usize;
16705    pub const DEFAULT: Self = Self {
16706        time_usec: 0_u32,
16707        servo1_raw: 0_u16,
16708        servo2_raw: 0_u16,
16709        servo3_raw: 0_u16,
16710        servo4_raw: 0_u16,
16711        servo5_raw: 0_u16,
16712        servo6_raw: 0_u16,
16713        servo7_raw: 0_u16,
16714        servo8_raw: 0_u16,
16715        port: 0_u8,
16716        servo9_raw: 0_u16,
16717        servo10_raw: 0_u16,
16718        servo11_raw: 0_u16,
16719        servo12_raw: 0_u16,
16720        servo13_raw: 0_u16,
16721        servo14_raw: 0_u16,
16722        servo15_raw: 0_u16,
16723        servo16_raw: 0_u16,
16724    };
16725    #[cfg(feature = "arbitrary")]
16726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16727        use arbitrary::{Arbitrary, Unstructured};
16728        let mut buf = [0u8; 1024];
16729        rng.fill_bytes(&mut buf);
16730        let mut unstructured = Unstructured::new(&buf);
16731        Self::arbitrary(&mut unstructured).unwrap_or_default()
16732    }
16733}
16734impl Default for SERVO_OUTPUT_RAW_DATA {
16735    fn default() -> Self {
16736        Self::DEFAULT.clone()
16737    }
16738}
16739impl MessageData for SERVO_OUTPUT_RAW_DATA {
16740    type Message = MavMessage;
16741    const ID: u32 = 36u32;
16742    const NAME: &'static str = "SERVO_OUTPUT_RAW";
16743    const EXTRA_CRC: u8 = 222u8;
16744    const ENCODED_LEN: usize = 37usize;
16745    fn deser(
16746        _version: MavlinkVersion,
16747        __input: &[u8],
16748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16749        let avail_len = __input.len();
16750        let mut payload_buf = [0; Self::ENCODED_LEN];
16751        let mut buf = if avail_len < Self::ENCODED_LEN {
16752            payload_buf[0..avail_len].copy_from_slice(__input);
16753            Bytes::new(&payload_buf)
16754        } else {
16755            Bytes::new(__input)
16756        };
16757        let mut __struct = Self::default();
16758        __struct.time_usec = buf.get_u32_le();
16759        __struct.servo1_raw = buf.get_u16_le();
16760        __struct.servo2_raw = buf.get_u16_le();
16761        __struct.servo3_raw = buf.get_u16_le();
16762        __struct.servo4_raw = buf.get_u16_le();
16763        __struct.servo5_raw = buf.get_u16_le();
16764        __struct.servo6_raw = buf.get_u16_le();
16765        __struct.servo7_raw = buf.get_u16_le();
16766        __struct.servo8_raw = buf.get_u16_le();
16767        __struct.port = buf.get_u8();
16768        __struct.servo9_raw = buf.get_u16_le();
16769        __struct.servo10_raw = buf.get_u16_le();
16770        __struct.servo11_raw = buf.get_u16_le();
16771        __struct.servo12_raw = buf.get_u16_le();
16772        __struct.servo13_raw = buf.get_u16_le();
16773        __struct.servo14_raw = buf.get_u16_le();
16774        __struct.servo15_raw = buf.get_u16_le();
16775        __struct.servo16_raw = buf.get_u16_le();
16776        Ok(__struct)
16777    }
16778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16779        let mut __tmp = BytesMut::new(bytes);
16780        #[allow(clippy::absurd_extreme_comparisons)]
16781        #[allow(unused_comparisons)]
16782        if __tmp.remaining() < Self::ENCODED_LEN {
16783            panic!(
16784                "buffer is too small (need {} bytes, but got {})",
16785                Self::ENCODED_LEN,
16786                __tmp.remaining(),
16787            )
16788        }
16789        __tmp.put_u32_le(self.time_usec);
16790        __tmp.put_u16_le(self.servo1_raw);
16791        __tmp.put_u16_le(self.servo2_raw);
16792        __tmp.put_u16_le(self.servo3_raw);
16793        __tmp.put_u16_le(self.servo4_raw);
16794        __tmp.put_u16_le(self.servo5_raw);
16795        __tmp.put_u16_le(self.servo6_raw);
16796        __tmp.put_u16_le(self.servo7_raw);
16797        __tmp.put_u16_le(self.servo8_raw);
16798        __tmp.put_u8(self.port);
16799        __tmp.put_u16_le(self.servo9_raw);
16800        __tmp.put_u16_le(self.servo10_raw);
16801        __tmp.put_u16_le(self.servo11_raw);
16802        __tmp.put_u16_le(self.servo12_raw);
16803        __tmp.put_u16_le(self.servo13_raw);
16804        __tmp.put_u16_le(self.servo14_raw);
16805        __tmp.put_u16_le(self.servo15_raw);
16806        __tmp.put_u16_le(self.servo16_raw);
16807        if matches!(version, MavlinkVersion::V2) {
16808            let len = __tmp.len();
16809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16810        } else {
16811            __tmp.len()
16812        }
16813    }
16814}
16815#[doc = "id: 93"]
16816#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16817#[derive(Debug, Clone, PartialEq)]
16818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16820pub struct HIL_ACTUATOR_CONTROLS_DATA {
16821    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16822    pub time_usec: u64,
16823    #[doc = "Flags bitmask."]
16824    pub flags: HilActuatorControlsFlags,
16825    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16827    pub controls: [f32; 16],
16828    #[doc = "System mode. Includes arming state."]
16829    pub mode: MavModeFlag,
16830}
16831impl HIL_ACTUATOR_CONTROLS_DATA {
16832    pub const ENCODED_LEN: usize = 81usize;
16833    pub const DEFAULT: Self = Self {
16834        time_usec: 0_u64,
16835        flags: HilActuatorControlsFlags::DEFAULT,
16836        controls: [0.0_f32; 16usize],
16837        mode: MavModeFlag::DEFAULT,
16838    };
16839    #[cfg(feature = "arbitrary")]
16840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16841        use arbitrary::{Arbitrary, Unstructured};
16842        let mut buf = [0u8; 1024];
16843        rng.fill_bytes(&mut buf);
16844        let mut unstructured = Unstructured::new(&buf);
16845        Self::arbitrary(&mut unstructured).unwrap_or_default()
16846    }
16847}
16848impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16849    fn default() -> Self {
16850        Self::DEFAULT.clone()
16851    }
16852}
16853impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16854    type Message = MavMessage;
16855    const ID: u32 = 93u32;
16856    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16857    const EXTRA_CRC: u8 = 47u8;
16858    const ENCODED_LEN: usize = 81usize;
16859    fn deser(
16860        _version: MavlinkVersion,
16861        __input: &[u8],
16862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16863        let avail_len = __input.len();
16864        let mut payload_buf = [0; Self::ENCODED_LEN];
16865        let mut buf = if avail_len < Self::ENCODED_LEN {
16866            payload_buf[0..avail_len].copy_from_slice(__input);
16867            Bytes::new(&payload_buf)
16868        } else {
16869            Bytes::new(__input)
16870        };
16871        let mut __struct = Self::default();
16872        __struct.time_usec = buf.get_u64_le();
16873        let tmp = buf.get_u64_le();
16874        __struct.flags =
16875            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16876                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16877                    flag_type: "HilActuatorControlsFlags",
16878                    value: tmp as u32,
16879                })?;
16880        for v in &mut __struct.controls {
16881            let val = buf.get_f32_le();
16882            *v = val;
16883        }
16884        let tmp = buf.get_u8();
16885        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16886            ::mavlink_core::error::ParserError::InvalidFlag {
16887                flag_type: "MavModeFlag",
16888                value: tmp as u32,
16889            },
16890        )?;
16891        Ok(__struct)
16892    }
16893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16894        let mut __tmp = BytesMut::new(bytes);
16895        #[allow(clippy::absurd_extreme_comparisons)]
16896        #[allow(unused_comparisons)]
16897        if __tmp.remaining() < Self::ENCODED_LEN {
16898            panic!(
16899                "buffer is too small (need {} bytes, but got {})",
16900                Self::ENCODED_LEN,
16901                __tmp.remaining(),
16902            )
16903        }
16904        __tmp.put_u64_le(self.time_usec);
16905        __tmp.put_u64_le(self.flags.bits());
16906        for val in &self.controls {
16907            __tmp.put_f32_le(*val);
16908        }
16909        __tmp.put_u8(self.mode.bits());
16910        if matches!(version, MavlinkVersion::V2) {
16911            let len = __tmp.len();
16912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16913        } else {
16914            __tmp.len()
16915        }
16916    }
16917}
16918#[doc = "id: 284"]
16919#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
16920#[derive(Debug, Clone, PartialEq)]
16921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16923pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
16924    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
16925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16926    pub q: [f32; 4],
16927    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
16928    pub angular_velocity_x: f32,
16929    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
16930    pub angular_velocity_y: f32,
16931    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
16932    pub angular_velocity_z: f32,
16933    #[doc = "Low level gimbal flags."]
16934    pub flags: GimbalDeviceFlags,
16935    #[doc = "System ID"]
16936    pub target_system: u8,
16937    #[doc = "Component ID"]
16938    pub target_component: u8,
16939}
16940impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
16941    pub const ENCODED_LEN: usize = 32usize;
16942    pub const DEFAULT: Self = Self {
16943        q: [0.0_f32; 4usize],
16944        angular_velocity_x: 0.0_f32,
16945        angular_velocity_y: 0.0_f32,
16946        angular_velocity_z: 0.0_f32,
16947        flags: GimbalDeviceFlags::DEFAULT,
16948        target_system: 0_u8,
16949        target_component: 0_u8,
16950    };
16951    #[cfg(feature = "arbitrary")]
16952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16953        use arbitrary::{Arbitrary, Unstructured};
16954        let mut buf = [0u8; 1024];
16955        rng.fill_bytes(&mut buf);
16956        let mut unstructured = Unstructured::new(&buf);
16957        Self::arbitrary(&mut unstructured).unwrap_or_default()
16958    }
16959}
16960impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
16961    fn default() -> Self {
16962        Self::DEFAULT.clone()
16963    }
16964}
16965impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
16966    type Message = MavMessage;
16967    const ID: u32 = 284u32;
16968    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
16969    const EXTRA_CRC: u8 = 99u8;
16970    const ENCODED_LEN: usize = 32usize;
16971    fn deser(
16972        _version: MavlinkVersion,
16973        __input: &[u8],
16974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16975        let avail_len = __input.len();
16976        let mut payload_buf = [0; Self::ENCODED_LEN];
16977        let mut buf = if avail_len < Self::ENCODED_LEN {
16978            payload_buf[0..avail_len].copy_from_slice(__input);
16979            Bytes::new(&payload_buf)
16980        } else {
16981            Bytes::new(__input)
16982        };
16983        let mut __struct = Self::default();
16984        for v in &mut __struct.q {
16985            let val = buf.get_f32_le();
16986            *v = val;
16987        }
16988        __struct.angular_velocity_x = buf.get_f32_le();
16989        __struct.angular_velocity_y = buf.get_f32_le();
16990        __struct.angular_velocity_z = buf.get_f32_le();
16991        let tmp = buf.get_u16_le();
16992        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
16993            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16994                flag_type: "GimbalDeviceFlags",
16995                value: tmp as u32,
16996            })?;
16997        __struct.target_system = buf.get_u8();
16998        __struct.target_component = buf.get_u8();
16999        Ok(__struct)
17000    }
17001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17002        let mut __tmp = BytesMut::new(bytes);
17003        #[allow(clippy::absurd_extreme_comparisons)]
17004        #[allow(unused_comparisons)]
17005        if __tmp.remaining() < Self::ENCODED_LEN {
17006            panic!(
17007                "buffer is too small (need {} bytes, but got {})",
17008                Self::ENCODED_LEN,
17009                __tmp.remaining(),
17010            )
17011        }
17012        for val in &self.q {
17013            __tmp.put_f32_le(*val);
17014        }
17015        __tmp.put_f32_le(self.angular_velocity_x);
17016        __tmp.put_f32_le(self.angular_velocity_y);
17017        __tmp.put_f32_le(self.angular_velocity_z);
17018        __tmp.put_u16_le(self.flags.bits());
17019        __tmp.put_u8(self.target_system);
17020        __tmp.put_u8(self.target_component);
17021        if matches!(version, MavlinkVersion::V2) {
17022            let len = __tmp.len();
17023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17024        } else {
17025            __tmp.len()
17026        }
17027    }
17028}
17029#[doc = "id: 235"]
17030#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
17031#[derive(Debug, Clone, PartialEq)]
17032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17034pub struct HIGH_LATENCY2_DATA {
17035    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
17036    pub timestamp: u32,
17037    #[doc = "Latitude"]
17038    pub latitude: i32,
17039    #[doc = "Longitude"]
17040    pub longitude: i32,
17041    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
17042    pub custom_mode: u16,
17043    #[doc = "Altitude above mean sea level"]
17044    pub altitude: i16,
17045    #[doc = "Altitude setpoint"]
17046    pub target_altitude: i16,
17047    #[doc = "Distance to target waypoint or position"]
17048    pub target_distance: u16,
17049    #[doc = "Current waypoint number"]
17050    pub wp_num: u16,
17051    #[doc = "Bitmap of failure flags."]
17052    pub failure_flags: HlFailureFlag,
17053    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
17054    pub mavtype: MavType,
17055    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
17056    pub autopilot: MavAutopilot,
17057    #[doc = "Heading"]
17058    pub heading: u8,
17059    #[doc = "Heading setpoint"]
17060    pub target_heading: u8,
17061    #[doc = "Throttle"]
17062    pub throttle: u8,
17063    #[doc = "Airspeed"]
17064    pub airspeed: u8,
17065    #[doc = "Airspeed setpoint"]
17066    pub airspeed_sp: u8,
17067    #[doc = "Groundspeed"]
17068    pub groundspeed: u8,
17069    #[doc = "Windspeed"]
17070    pub windspeed: u8,
17071    #[doc = "Wind heading"]
17072    pub wind_heading: u8,
17073    #[doc = "Maximum error horizontal position since last message"]
17074    pub eph: u8,
17075    #[doc = "Maximum error vertical position since last message"]
17076    pub epv: u8,
17077    #[doc = "Air temperature"]
17078    pub temperature_air: i8,
17079    #[doc = "Maximum climb rate magnitude since last message"]
17080    pub climb_rate: i8,
17081    #[doc = "Battery level (-1 if field not provided)."]
17082    pub battery: i8,
17083    #[doc = "Field for custom payload."]
17084    pub custom0: i8,
17085    #[doc = "Field for custom payload."]
17086    pub custom1: i8,
17087    #[doc = "Field for custom payload."]
17088    pub custom2: i8,
17089}
17090impl HIGH_LATENCY2_DATA {
17091    pub const ENCODED_LEN: usize = 42usize;
17092    pub const DEFAULT: Self = Self {
17093        timestamp: 0_u32,
17094        latitude: 0_i32,
17095        longitude: 0_i32,
17096        custom_mode: 0_u16,
17097        altitude: 0_i16,
17098        target_altitude: 0_i16,
17099        target_distance: 0_u16,
17100        wp_num: 0_u16,
17101        failure_flags: HlFailureFlag::DEFAULT,
17102        mavtype: MavType::DEFAULT,
17103        autopilot: MavAutopilot::DEFAULT,
17104        heading: 0_u8,
17105        target_heading: 0_u8,
17106        throttle: 0_u8,
17107        airspeed: 0_u8,
17108        airspeed_sp: 0_u8,
17109        groundspeed: 0_u8,
17110        windspeed: 0_u8,
17111        wind_heading: 0_u8,
17112        eph: 0_u8,
17113        epv: 0_u8,
17114        temperature_air: 0_i8,
17115        climb_rate: 0_i8,
17116        battery: 0_i8,
17117        custom0: 0_i8,
17118        custom1: 0_i8,
17119        custom2: 0_i8,
17120    };
17121    #[cfg(feature = "arbitrary")]
17122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17123        use arbitrary::{Arbitrary, Unstructured};
17124        let mut buf = [0u8; 1024];
17125        rng.fill_bytes(&mut buf);
17126        let mut unstructured = Unstructured::new(&buf);
17127        Self::arbitrary(&mut unstructured).unwrap_or_default()
17128    }
17129}
17130impl Default for HIGH_LATENCY2_DATA {
17131    fn default() -> Self {
17132        Self::DEFAULT.clone()
17133    }
17134}
17135impl MessageData for HIGH_LATENCY2_DATA {
17136    type Message = MavMessage;
17137    const ID: u32 = 235u32;
17138    const NAME: &'static str = "HIGH_LATENCY2";
17139    const EXTRA_CRC: u8 = 179u8;
17140    const ENCODED_LEN: usize = 42usize;
17141    fn deser(
17142        _version: MavlinkVersion,
17143        __input: &[u8],
17144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17145        let avail_len = __input.len();
17146        let mut payload_buf = [0; Self::ENCODED_LEN];
17147        let mut buf = if avail_len < Self::ENCODED_LEN {
17148            payload_buf[0..avail_len].copy_from_slice(__input);
17149            Bytes::new(&payload_buf)
17150        } else {
17151            Bytes::new(__input)
17152        };
17153        let mut __struct = Self::default();
17154        __struct.timestamp = buf.get_u32_le();
17155        __struct.latitude = buf.get_i32_le();
17156        __struct.longitude = buf.get_i32_le();
17157        __struct.custom_mode = buf.get_u16_le();
17158        __struct.altitude = buf.get_i16_le();
17159        __struct.target_altitude = buf.get_i16_le();
17160        __struct.target_distance = buf.get_u16_le();
17161        __struct.wp_num = buf.get_u16_le();
17162        let tmp = buf.get_u16_le();
17163        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
17164            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17165                flag_type: "HlFailureFlag",
17166                value: tmp as u32,
17167            })?;
17168        let tmp = buf.get_u8();
17169        __struct.mavtype =
17170            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17171                enum_type: "MavType",
17172                value: tmp as u32,
17173            })?;
17174        let tmp = buf.get_u8();
17175        __struct.autopilot =
17176            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17177                enum_type: "MavAutopilot",
17178                value: tmp as u32,
17179            })?;
17180        __struct.heading = buf.get_u8();
17181        __struct.target_heading = buf.get_u8();
17182        __struct.throttle = buf.get_u8();
17183        __struct.airspeed = buf.get_u8();
17184        __struct.airspeed_sp = buf.get_u8();
17185        __struct.groundspeed = buf.get_u8();
17186        __struct.windspeed = buf.get_u8();
17187        __struct.wind_heading = buf.get_u8();
17188        __struct.eph = buf.get_u8();
17189        __struct.epv = buf.get_u8();
17190        __struct.temperature_air = buf.get_i8();
17191        __struct.climb_rate = buf.get_i8();
17192        __struct.battery = buf.get_i8();
17193        __struct.custom0 = buf.get_i8();
17194        __struct.custom1 = buf.get_i8();
17195        __struct.custom2 = buf.get_i8();
17196        Ok(__struct)
17197    }
17198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17199        let mut __tmp = BytesMut::new(bytes);
17200        #[allow(clippy::absurd_extreme_comparisons)]
17201        #[allow(unused_comparisons)]
17202        if __tmp.remaining() < Self::ENCODED_LEN {
17203            panic!(
17204                "buffer is too small (need {} bytes, but got {})",
17205                Self::ENCODED_LEN,
17206                __tmp.remaining(),
17207            )
17208        }
17209        __tmp.put_u32_le(self.timestamp);
17210        __tmp.put_i32_le(self.latitude);
17211        __tmp.put_i32_le(self.longitude);
17212        __tmp.put_u16_le(self.custom_mode);
17213        __tmp.put_i16_le(self.altitude);
17214        __tmp.put_i16_le(self.target_altitude);
17215        __tmp.put_u16_le(self.target_distance);
17216        __tmp.put_u16_le(self.wp_num);
17217        __tmp.put_u16_le(self.failure_flags.bits());
17218        __tmp.put_u8(self.mavtype as u8);
17219        __tmp.put_u8(self.autopilot as u8);
17220        __tmp.put_u8(self.heading);
17221        __tmp.put_u8(self.target_heading);
17222        __tmp.put_u8(self.throttle);
17223        __tmp.put_u8(self.airspeed);
17224        __tmp.put_u8(self.airspeed_sp);
17225        __tmp.put_u8(self.groundspeed);
17226        __tmp.put_u8(self.windspeed);
17227        __tmp.put_u8(self.wind_heading);
17228        __tmp.put_u8(self.eph);
17229        __tmp.put_u8(self.epv);
17230        __tmp.put_i8(self.temperature_air);
17231        __tmp.put_i8(self.climb_rate);
17232        __tmp.put_i8(self.battery);
17233        __tmp.put_i8(self.custom0);
17234        __tmp.put_i8(self.custom1);
17235        __tmp.put_i8(self.custom2);
17236        if matches!(version, MavlinkVersion::V2) {
17237            let len = __tmp.len();
17238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17239        } else {
17240            __tmp.len()
17241        }
17242    }
17243}
17244#[doc = "id: 132"]
17245#[doc = "Distance sensor information for an onboard rangefinder."]
17246#[derive(Debug, Clone, PartialEq)]
17247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17249pub struct DISTANCE_SENSOR_DATA {
17250    #[doc = "Timestamp (time since system boot)."]
17251    pub time_boot_ms: u32,
17252    #[doc = "Minimum distance the sensor can measure"]
17253    pub min_distance: u16,
17254    #[doc = "Maximum distance the sensor can measure"]
17255    pub max_distance: u16,
17256    #[doc = "Current distance reading"]
17257    pub current_distance: u16,
17258    #[doc = "Type of distance sensor."]
17259    pub mavtype: MavDistanceSensor,
17260    #[doc = "Onboard ID of the sensor"]
17261    pub id: u8,
17262    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
17263    pub orientation: MavSensorOrientation,
17264    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
17265    pub covariance: u8,
17266    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
17267    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17268    pub horizontal_fov: f32,
17269    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
17270    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17271    pub vertical_fov: f32,
17272    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
17273    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17275    pub quaternion: [f32; 4],
17276    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
17277    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17278    pub signal_quality: u8,
17279}
17280impl DISTANCE_SENSOR_DATA {
17281    pub const ENCODED_LEN: usize = 39usize;
17282    pub const DEFAULT: Self = Self {
17283        time_boot_ms: 0_u32,
17284        min_distance: 0_u16,
17285        max_distance: 0_u16,
17286        current_distance: 0_u16,
17287        mavtype: MavDistanceSensor::DEFAULT,
17288        id: 0_u8,
17289        orientation: MavSensorOrientation::DEFAULT,
17290        covariance: 0_u8,
17291        horizontal_fov: 0.0_f32,
17292        vertical_fov: 0.0_f32,
17293        quaternion: [0.0_f32; 4usize],
17294        signal_quality: 0_u8,
17295    };
17296    #[cfg(feature = "arbitrary")]
17297    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17298        use arbitrary::{Arbitrary, Unstructured};
17299        let mut buf = [0u8; 1024];
17300        rng.fill_bytes(&mut buf);
17301        let mut unstructured = Unstructured::new(&buf);
17302        Self::arbitrary(&mut unstructured).unwrap_or_default()
17303    }
17304}
17305impl Default for DISTANCE_SENSOR_DATA {
17306    fn default() -> Self {
17307        Self::DEFAULT.clone()
17308    }
17309}
17310impl MessageData for DISTANCE_SENSOR_DATA {
17311    type Message = MavMessage;
17312    const ID: u32 = 132u32;
17313    const NAME: &'static str = "DISTANCE_SENSOR";
17314    const EXTRA_CRC: u8 = 85u8;
17315    const ENCODED_LEN: usize = 39usize;
17316    fn deser(
17317        _version: MavlinkVersion,
17318        __input: &[u8],
17319    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17320        let avail_len = __input.len();
17321        let mut payload_buf = [0; Self::ENCODED_LEN];
17322        let mut buf = if avail_len < Self::ENCODED_LEN {
17323            payload_buf[0..avail_len].copy_from_slice(__input);
17324            Bytes::new(&payload_buf)
17325        } else {
17326            Bytes::new(__input)
17327        };
17328        let mut __struct = Self::default();
17329        __struct.time_boot_ms = buf.get_u32_le();
17330        __struct.min_distance = buf.get_u16_le();
17331        __struct.max_distance = buf.get_u16_le();
17332        __struct.current_distance = buf.get_u16_le();
17333        let tmp = buf.get_u8();
17334        __struct.mavtype =
17335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17336                enum_type: "MavDistanceSensor",
17337                value: tmp as u32,
17338            })?;
17339        __struct.id = buf.get_u8();
17340        let tmp = buf.get_u8();
17341        __struct.orientation =
17342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17343                enum_type: "MavSensorOrientation",
17344                value: tmp as u32,
17345            })?;
17346        __struct.covariance = buf.get_u8();
17347        __struct.horizontal_fov = buf.get_f32_le();
17348        __struct.vertical_fov = buf.get_f32_le();
17349        for v in &mut __struct.quaternion {
17350            let val = buf.get_f32_le();
17351            *v = val;
17352        }
17353        __struct.signal_quality = buf.get_u8();
17354        Ok(__struct)
17355    }
17356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17357        let mut __tmp = BytesMut::new(bytes);
17358        #[allow(clippy::absurd_extreme_comparisons)]
17359        #[allow(unused_comparisons)]
17360        if __tmp.remaining() < Self::ENCODED_LEN {
17361            panic!(
17362                "buffer is too small (need {} bytes, but got {})",
17363                Self::ENCODED_LEN,
17364                __tmp.remaining(),
17365            )
17366        }
17367        __tmp.put_u32_le(self.time_boot_ms);
17368        __tmp.put_u16_le(self.min_distance);
17369        __tmp.put_u16_le(self.max_distance);
17370        __tmp.put_u16_le(self.current_distance);
17371        __tmp.put_u8(self.mavtype as u8);
17372        __tmp.put_u8(self.id);
17373        __tmp.put_u8(self.orientation as u8);
17374        __tmp.put_u8(self.covariance);
17375        __tmp.put_f32_le(self.horizontal_fov);
17376        __tmp.put_f32_le(self.vertical_fov);
17377        for val in &self.quaternion {
17378            __tmp.put_f32_le(*val);
17379        }
17380        __tmp.put_u8(self.signal_quality);
17381        if matches!(version, MavlinkVersion::V2) {
17382            let len = __tmp.len();
17383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17384        } else {
17385            __tmp.len()
17386        }
17387    }
17388}
17389#[doc = "id: 257"]
17390#[doc = "Report button state change."]
17391#[derive(Debug, Clone, PartialEq)]
17392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17394pub struct BUTTON_CHANGE_DATA {
17395    #[doc = "Timestamp (time since system boot)."]
17396    pub time_boot_ms: u32,
17397    #[doc = "Time of last change of button state."]
17398    pub last_change_ms: u32,
17399    #[doc = "Bitmap for state of buttons."]
17400    pub state: u8,
17401}
17402impl BUTTON_CHANGE_DATA {
17403    pub const ENCODED_LEN: usize = 9usize;
17404    pub const DEFAULT: Self = Self {
17405        time_boot_ms: 0_u32,
17406        last_change_ms: 0_u32,
17407        state: 0_u8,
17408    };
17409    #[cfg(feature = "arbitrary")]
17410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17411        use arbitrary::{Arbitrary, Unstructured};
17412        let mut buf = [0u8; 1024];
17413        rng.fill_bytes(&mut buf);
17414        let mut unstructured = Unstructured::new(&buf);
17415        Self::arbitrary(&mut unstructured).unwrap_or_default()
17416    }
17417}
17418impl Default for BUTTON_CHANGE_DATA {
17419    fn default() -> Self {
17420        Self::DEFAULT.clone()
17421    }
17422}
17423impl MessageData for BUTTON_CHANGE_DATA {
17424    type Message = MavMessage;
17425    const ID: u32 = 257u32;
17426    const NAME: &'static str = "BUTTON_CHANGE";
17427    const EXTRA_CRC: u8 = 131u8;
17428    const ENCODED_LEN: usize = 9usize;
17429    fn deser(
17430        _version: MavlinkVersion,
17431        __input: &[u8],
17432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17433        let avail_len = __input.len();
17434        let mut payload_buf = [0; Self::ENCODED_LEN];
17435        let mut buf = if avail_len < Self::ENCODED_LEN {
17436            payload_buf[0..avail_len].copy_from_slice(__input);
17437            Bytes::new(&payload_buf)
17438        } else {
17439            Bytes::new(__input)
17440        };
17441        let mut __struct = Self::default();
17442        __struct.time_boot_ms = buf.get_u32_le();
17443        __struct.last_change_ms = buf.get_u32_le();
17444        __struct.state = buf.get_u8();
17445        Ok(__struct)
17446    }
17447    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17448        let mut __tmp = BytesMut::new(bytes);
17449        #[allow(clippy::absurd_extreme_comparisons)]
17450        #[allow(unused_comparisons)]
17451        if __tmp.remaining() < Self::ENCODED_LEN {
17452            panic!(
17453                "buffer is too small (need {} bytes, but got {})",
17454                Self::ENCODED_LEN,
17455                __tmp.remaining(),
17456            )
17457        }
17458        __tmp.put_u32_le(self.time_boot_ms);
17459        __tmp.put_u32_le(self.last_change_ms);
17460        __tmp.put_u8(self.state);
17461        if matches!(version, MavlinkVersion::V2) {
17462            let len = __tmp.len();
17463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17464        } else {
17465            __tmp.len()
17466        }
17467    }
17468}
17469#[doc = "id: 371"]
17470#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
17471#[derive(Debug, Clone, PartialEq)]
17472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17474pub struct FUEL_STATUS_DATA {
17475    #[doc = "Capacity when full. Must be provided."]
17476    pub maximum_fuel: f32,
17477    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
17478    pub consumed_fuel: f32,
17479    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
17480    pub remaining_fuel: f32,
17481    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
17482    pub flow_rate: f32,
17483    #[doc = "Fuel temperature. NaN: field not provided."]
17484    pub temperature: f32,
17485    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
17486    pub fuel_type: MavFuelType,
17487    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
17488    pub id: u8,
17489    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
17490    pub percent_remaining: u8,
17491}
17492impl FUEL_STATUS_DATA {
17493    pub const ENCODED_LEN: usize = 26usize;
17494    pub const DEFAULT: Self = Self {
17495        maximum_fuel: 0.0_f32,
17496        consumed_fuel: 0.0_f32,
17497        remaining_fuel: 0.0_f32,
17498        flow_rate: 0.0_f32,
17499        temperature: 0.0_f32,
17500        fuel_type: MavFuelType::DEFAULT,
17501        id: 0_u8,
17502        percent_remaining: 0_u8,
17503    };
17504    #[cfg(feature = "arbitrary")]
17505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17506        use arbitrary::{Arbitrary, Unstructured};
17507        let mut buf = [0u8; 1024];
17508        rng.fill_bytes(&mut buf);
17509        let mut unstructured = Unstructured::new(&buf);
17510        Self::arbitrary(&mut unstructured).unwrap_or_default()
17511    }
17512}
17513impl Default for FUEL_STATUS_DATA {
17514    fn default() -> Self {
17515        Self::DEFAULT.clone()
17516    }
17517}
17518impl MessageData for FUEL_STATUS_DATA {
17519    type Message = MavMessage;
17520    const ID: u32 = 371u32;
17521    const NAME: &'static str = "FUEL_STATUS";
17522    const EXTRA_CRC: u8 = 10u8;
17523    const ENCODED_LEN: usize = 26usize;
17524    fn deser(
17525        _version: MavlinkVersion,
17526        __input: &[u8],
17527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17528        let avail_len = __input.len();
17529        let mut payload_buf = [0; Self::ENCODED_LEN];
17530        let mut buf = if avail_len < Self::ENCODED_LEN {
17531            payload_buf[0..avail_len].copy_from_slice(__input);
17532            Bytes::new(&payload_buf)
17533        } else {
17534            Bytes::new(__input)
17535        };
17536        let mut __struct = Self::default();
17537        __struct.maximum_fuel = buf.get_f32_le();
17538        __struct.consumed_fuel = buf.get_f32_le();
17539        __struct.remaining_fuel = buf.get_f32_le();
17540        __struct.flow_rate = buf.get_f32_le();
17541        __struct.temperature = buf.get_f32_le();
17542        let tmp = buf.get_u32_le();
17543        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
17544            ::mavlink_core::error::ParserError::InvalidEnum {
17545                enum_type: "MavFuelType",
17546                value: tmp as u32,
17547            },
17548        )?;
17549        __struct.id = buf.get_u8();
17550        __struct.percent_remaining = buf.get_u8();
17551        Ok(__struct)
17552    }
17553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17554        let mut __tmp = BytesMut::new(bytes);
17555        #[allow(clippy::absurd_extreme_comparisons)]
17556        #[allow(unused_comparisons)]
17557        if __tmp.remaining() < Self::ENCODED_LEN {
17558            panic!(
17559                "buffer is too small (need {} bytes, but got {})",
17560                Self::ENCODED_LEN,
17561                __tmp.remaining(),
17562            )
17563        }
17564        __tmp.put_f32_le(self.maximum_fuel);
17565        __tmp.put_f32_le(self.consumed_fuel);
17566        __tmp.put_f32_le(self.remaining_fuel);
17567        __tmp.put_f32_le(self.flow_rate);
17568        __tmp.put_f32_le(self.temperature);
17569        __tmp.put_u32_le(self.fuel_type as u32);
17570        __tmp.put_u8(self.id);
17571        __tmp.put_u8(self.percent_remaining);
17572        if matches!(version, MavlinkVersion::V2) {
17573            let len = __tmp.len();
17574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17575        } else {
17576            __tmp.len()
17577        }
17578    }
17579}
17580#[doc = "id: 104"]
17581#[doc = "Global position estimate from a Vicon motion system source."]
17582#[derive(Debug, Clone, PartialEq)]
17583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17585pub struct VICON_POSITION_ESTIMATE_DATA {
17586    #[doc = "Timestamp (UNIX time or time since system boot)"]
17587    pub usec: u64,
17588    #[doc = "Global X position"]
17589    pub x: f32,
17590    #[doc = "Global Y position"]
17591    pub y: f32,
17592    #[doc = "Global Z position"]
17593    pub z: f32,
17594    #[doc = "Roll angle"]
17595    pub roll: f32,
17596    #[doc = "Pitch angle"]
17597    pub pitch: f32,
17598    #[doc = "Yaw angle"]
17599    pub yaw: f32,
17600    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
17601    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17602    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17603    pub covariance: [f32; 21],
17604}
17605impl VICON_POSITION_ESTIMATE_DATA {
17606    pub const ENCODED_LEN: usize = 116usize;
17607    pub const DEFAULT: Self = Self {
17608        usec: 0_u64,
17609        x: 0.0_f32,
17610        y: 0.0_f32,
17611        z: 0.0_f32,
17612        roll: 0.0_f32,
17613        pitch: 0.0_f32,
17614        yaw: 0.0_f32,
17615        covariance: [0.0_f32; 21usize],
17616    };
17617    #[cfg(feature = "arbitrary")]
17618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17619        use arbitrary::{Arbitrary, Unstructured};
17620        let mut buf = [0u8; 1024];
17621        rng.fill_bytes(&mut buf);
17622        let mut unstructured = Unstructured::new(&buf);
17623        Self::arbitrary(&mut unstructured).unwrap_or_default()
17624    }
17625}
17626impl Default for VICON_POSITION_ESTIMATE_DATA {
17627    fn default() -> Self {
17628        Self::DEFAULT.clone()
17629    }
17630}
17631impl MessageData for VICON_POSITION_ESTIMATE_DATA {
17632    type Message = MavMessage;
17633    const ID: u32 = 104u32;
17634    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
17635    const EXTRA_CRC: u8 = 56u8;
17636    const ENCODED_LEN: usize = 116usize;
17637    fn deser(
17638        _version: MavlinkVersion,
17639        __input: &[u8],
17640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17641        let avail_len = __input.len();
17642        let mut payload_buf = [0; Self::ENCODED_LEN];
17643        let mut buf = if avail_len < Self::ENCODED_LEN {
17644            payload_buf[0..avail_len].copy_from_slice(__input);
17645            Bytes::new(&payload_buf)
17646        } else {
17647            Bytes::new(__input)
17648        };
17649        let mut __struct = Self::default();
17650        __struct.usec = buf.get_u64_le();
17651        __struct.x = buf.get_f32_le();
17652        __struct.y = buf.get_f32_le();
17653        __struct.z = buf.get_f32_le();
17654        __struct.roll = buf.get_f32_le();
17655        __struct.pitch = buf.get_f32_le();
17656        __struct.yaw = buf.get_f32_le();
17657        for v in &mut __struct.covariance {
17658            let val = buf.get_f32_le();
17659            *v = val;
17660        }
17661        Ok(__struct)
17662    }
17663    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17664        let mut __tmp = BytesMut::new(bytes);
17665        #[allow(clippy::absurd_extreme_comparisons)]
17666        #[allow(unused_comparisons)]
17667        if __tmp.remaining() < Self::ENCODED_LEN {
17668            panic!(
17669                "buffer is too small (need {} bytes, but got {})",
17670                Self::ENCODED_LEN,
17671                __tmp.remaining(),
17672            )
17673        }
17674        __tmp.put_u64_le(self.usec);
17675        __tmp.put_f32_le(self.x);
17676        __tmp.put_f32_le(self.y);
17677        __tmp.put_f32_le(self.z);
17678        __tmp.put_f32_le(self.roll);
17679        __tmp.put_f32_le(self.pitch);
17680        __tmp.put_f32_le(self.yaw);
17681        for val in &self.covariance {
17682            __tmp.put_f32_le(*val);
17683        }
17684        if matches!(version, MavlinkVersion::V2) {
17685            let len = __tmp.len();
17686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17687        } else {
17688            __tmp.len()
17689        }
17690    }
17691}
17692#[doc = "id: 411"]
17693#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
17694#[derive(Debug, Clone, PartialEq)]
17695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17697pub struct CURRENT_EVENT_SEQUENCE_DATA {
17698    #[doc = "Sequence number."]
17699    pub sequence: u16,
17700    #[doc = "Flag bitset."]
17701    pub flags: MavEventCurrentSequenceFlags,
17702}
17703impl CURRENT_EVENT_SEQUENCE_DATA {
17704    pub const ENCODED_LEN: usize = 3usize;
17705    pub const DEFAULT: Self = Self {
17706        sequence: 0_u16,
17707        flags: MavEventCurrentSequenceFlags::DEFAULT,
17708    };
17709    #[cfg(feature = "arbitrary")]
17710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17711        use arbitrary::{Arbitrary, Unstructured};
17712        let mut buf = [0u8; 1024];
17713        rng.fill_bytes(&mut buf);
17714        let mut unstructured = Unstructured::new(&buf);
17715        Self::arbitrary(&mut unstructured).unwrap_or_default()
17716    }
17717}
17718impl Default for CURRENT_EVENT_SEQUENCE_DATA {
17719    fn default() -> Self {
17720        Self::DEFAULT.clone()
17721    }
17722}
17723impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
17724    type Message = MavMessage;
17725    const ID: u32 = 411u32;
17726    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
17727    const EXTRA_CRC: u8 = 106u8;
17728    const ENCODED_LEN: usize = 3usize;
17729    fn deser(
17730        _version: MavlinkVersion,
17731        __input: &[u8],
17732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17733        let avail_len = __input.len();
17734        let mut payload_buf = [0; Self::ENCODED_LEN];
17735        let mut buf = if avail_len < Self::ENCODED_LEN {
17736            payload_buf[0..avail_len].copy_from_slice(__input);
17737            Bytes::new(&payload_buf)
17738        } else {
17739            Bytes::new(__input)
17740        };
17741        let mut __struct = Self::default();
17742        __struct.sequence = buf.get_u16_le();
17743        let tmp = buf.get_u8();
17744        __struct.flags =
17745            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17746                enum_type: "MavEventCurrentSequenceFlags",
17747                value: tmp as u32,
17748            })?;
17749        Ok(__struct)
17750    }
17751    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17752        let mut __tmp = BytesMut::new(bytes);
17753        #[allow(clippy::absurd_extreme_comparisons)]
17754        #[allow(unused_comparisons)]
17755        if __tmp.remaining() < Self::ENCODED_LEN {
17756            panic!(
17757                "buffer is too small (need {} bytes, but got {})",
17758                Self::ENCODED_LEN,
17759                __tmp.remaining(),
17760            )
17761        }
17762        __tmp.put_u16_le(self.sequence);
17763        __tmp.put_u8(self.flags as u8);
17764        if matches!(version, MavlinkVersion::V2) {
17765            let len = __tmp.len();
17766            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17767        } else {
17768            __tmp.len()
17769        }
17770    }
17771}
17772#[doc = "id: 48"]
17773#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
17774#[derive(Debug, Clone, PartialEq)]
17775#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17776#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17777pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
17778    #[doc = "Latitude (WGS84)"]
17779    pub latitude: i32,
17780    #[doc = "Longitude (WGS84)"]
17781    pub longitude: i32,
17782    #[doc = "Altitude (MSL). Positive for up."]
17783    pub altitude: i32,
17784    #[doc = "System ID"]
17785    pub target_system: u8,
17786    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17788    pub time_usec: u64,
17789}
17790impl SET_GPS_GLOBAL_ORIGIN_DATA {
17791    pub const ENCODED_LEN: usize = 21usize;
17792    pub const DEFAULT: Self = Self {
17793        latitude: 0_i32,
17794        longitude: 0_i32,
17795        altitude: 0_i32,
17796        target_system: 0_u8,
17797        time_usec: 0_u64,
17798    };
17799    #[cfg(feature = "arbitrary")]
17800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17801        use arbitrary::{Arbitrary, Unstructured};
17802        let mut buf = [0u8; 1024];
17803        rng.fill_bytes(&mut buf);
17804        let mut unstructured = Unstructured::new(&buf);
17805        Self::arbitrary(&mut unstructured).unwrap_or_default()
17806    }
17807}
17808impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
17809    fn default() -> Self {
17810        Self::DEFAULT.clone()
17811    }
17812}
17813impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
17814    type Message = MavMessage;
17815    const ID: u32 = 48u32;
17816    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
17817    const EXTRA_CRC: u8 = 41u8;
17818    const ENCODED_LEN: usize = 21usize;
17819    fn deser(
17820        _version: MavlinkVersion,
17821        __input: &[u8],
17822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17823        let avail_len = __input.len();
17824        let mut payload_buf = [0; Self::ENCODED_LEN];
17825        let mut buf = if avail_len < Self::ENCODED_LEN {
17826            payload_buf[0..avail_len].copy_from_slice(__input);
17827            Bytes::new(&payload_buf)
17828        } else {
17829            Bytes::new(__input)
17830        };
17831        let mut __struct = Self::default();
17832        __struct.latitude = buf.get_i32_le();
17833        __struct.longitude = buf.get_i32_le();
17834        __struct.altitude = buf.get_i32_le();
17835        __struct.target_system = buf.get_u8();
17836        __struct.time_usec = buf.get_u64_le();
17837        Ok(__struct)
17838    }
17839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17840        let mut __tmp = BytesMut::new(bytes);
17841        #[allow(clippy::absurd_extreme_comparisons)]
17842        #[allow(unused_comparisons)]
17843        if __tmp.remaining() < Self::ENCODED_LEN {
17844            panic!(
17845                "buffer is too small (need {} bytes, but got {})",
17846                Self::ENCODED_LEN,
17847                __tmp.remaining(),
17848            )
17849        }
17850        __tmp.put_i32_le(self.latitude);
17851        __tmp.put_i32_le(self.longitude);
17852        __tmp.put_i32_le(self.altitude);
17853        __tmp.put_u8(self.target_system);
17854        __tmp.put_u64_le(self.time_usec);
17855        if matches!(version, MavlinkVersion::V2) {
17856            let len = __tmp.len();
17857            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17858        } else {
17859            __tmp.len()
17860        }
17861    }
17862}
17863#[doc = "id: 139"]
17864#[doc = "Set the vehicle attitude and body angular rates."]
17865#[derive(Debug, Clone, PartialEq)]
17866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17868pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
17869    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17870    pub time_usec: u64,
17871    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
17872    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17873    pub controls: [f32; 8],
17874    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
17875    pub group_mlx: u8,
17876    #[doc = "System ID"]
17877    pub target_system: u8,
17878    #[doc = "Component ID"]
17879    pub target_component: u8,
17880}
17881impl SET_ACTUATOR_CONTROL_TARGET_DATA {
17882    pub const ENCODED_LEN: usize = 43usize;
17883    pub const DEFAULT: Self = Self {
17884        time_usec: 0_u64,
17885        controls: [0.0_f32; 8usize],
17886        group_mlx: 0_u8,
17887        target_system: 0_u8,
17888        target_component: 0_u8,
17889    };
17890    #[cfg(feature = "arbitrary")]
17891    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17892        use arbitrary::{Arbitrary, Unstructured};
17893        let mut buf = [0u8; 1024];
17894        rng.fill_bytes(&mut buf);
17895        let mut unstructured = Unstructured::new(&buf);
17896        Self::arbitrary(&mut unstructured).unwrap_or_default()
17897    }
17898}
17899impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
17900    fn default() -> Self {
17901        Self::DEFAULT.clone()
17902    }
17903}
17904impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
17905    type Message = MavMessage;
17906    const ID: u32 = 139u32;
17907    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
17908    const EXTRA_CRC: u8 = 168u8;
17909    const ENCODED_LEN: usize = 43usize;
17910    fn deser(
17911        _version: MavlinkVersion,
17912        __input: &[u8],
17913    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17914        let avail_len = __input.len();
17915        let mut payload_buf = [0; Self::ENCODED_LEN];
17916        let mut buf = if avail_len < Self::ENCODED_LEN {
17917            payload_buf[0..avail_len].copy_from_slice(__input);
17918            Bytes::new(&payload_buf)
17919        } else {
17920            Bytes::new(__input)
17921        };
17922        let mut __struct = Self::default();
17923        __struct.time_usec = buf.get_u64_le();
17924        for v in &mut __struct.controls {
17925            let val = buf.get_f32_le();
17926            *v = val;
17927        }
17928        __struct.group_mlx = buf.get_u8();
17929        __struct.target_system = buf.get_u8();
17930        __struct.target_component = buf.get_u8();
17931        Ok(__struct)
17932    }
17933    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17934        let mut __tmp = BytesMut::new(bytes);
17935        #[allow(clippy::absurd_extreme_comparisons)]
17936        #[allow(unused_comparisons)]
17937        if __tmp.remaining() < Self::ENCODED_LEN {
17938            panic!(
17939                "buffer is too small (need {} bytes, but got {})",
17940                Self::ENCODED_LEN,
17941                __tmp.remaining(),
17942            )
17943        }
17944        __tmp.put_u64_le(self.time_usec);
17945        for val in &self.controls {
17946            __tmp.put_f32_le(*val);
17947        }
17948        __tmp.put_u8(self.group_mlx);
17949        __tmp.put_u8(self.target_system);
17950        __tmp.put_u8(self.target_component);
17951        if matches!(version, MavlinkVersion::V2) {
17952            let len = __tmp.len();
17953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17954        } else {
17955            __tmp.len()
17956        }
17957    }
17958}
17959#[doc = "id: 291"]
17960#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
17961#[derive(Debug, Clone, PartialEq)]
17962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17964pub struct ESC_STATUS_DATA {
17965    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
17966    pub time_usec: u64,
17967    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
17968    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17969    pub rpm: [i32; 4],
17970    #[doc = "Voltage measured from each ESC."]
17971    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17972    pub voltage: [f32; 4],
17973    #[doc = "Current measured from each ESC."]
17974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17975    pub current: [f32; 4],
17976    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
17977    pub index: u8,
17978}
17979impl ESC_STATUS_DATA {
17980    pub const ENCODED_LEN: usize = 57usize;
17981    pub const DEFAULT: Self = Self {
17982        time_usec: 0_u64,
17983        rpm: [0_i32; 4usize],
17984        voltage: [0.0_f32; 4usize],
17985        current: [0.0_f32; 4usize],
17986        index: 0_u8,
17987    };
17988    #[cfg(feature = "arbitrary")]
17989    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17990        use arbitrary::{Arbitrary, Unstructured};
17991        let mut buf = [0u8; 1024];
17992        rng.fill_bytes(&mut buf);
17993        let mut unstructured = Unstructured::new(&buf);
17994        Self::arbitrary(&mut unstructured).unwrap_or_default()
17995    }
17996}
17997impl Default for ESC_STATUS_DATA {
17998    fn default() -> Self {
17999        Self::DEFAULT.clone()
18000    }
18001}
18002impl MessageData for ESC_STATUS_DATA {
18003    type Message = MavMessage;
18004    const ID: u32 = 291u32;
18005    const NAME: &'static str = "ESC_STATUS";
18006    const EXTRA_CRC: u8 = 10u8;
18007    const ENCODED_LEN: usize = 57usize;
18008    fn deser(
18009        _version: MavlinkVersion,
18010        __input: &[u8],
18011    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18012        let avail_len = __input.len();
18013        let mut payload_buf = [0; Self::ENCODED_LEN];
18014        let mut buf = if avail_len < Self::ENCODED_LEN {
18015            payload_buf[0..avail_len].copy_from_slice(__input);
18016            Bytes::new(&payload_buf)
18017        } else {
18018            Bytes::new(__input)
18019        };
18020        let mut __struct = Self::default();
18021        __struct.time_usec = buf.get_u64_le();
18022        for v in &mut __struct.rpm {
18023            let val = buf.get_i32_le();
18024            *v = val;
18025        }
18026        for v in &mut __struct.voltage {
18027            let val = buf.get_f32_le();
18028            *v = val;
18029        }
18030        for v in &mut __struct.current {
18031            let val = buf.get_f32_le();
18032            *v = val;
18033        }
18034        __struct.index = buf.get_u8();
18035        Ok(__struct)
18036    }
18037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18038        let mut __tmp = BytesMut::new(bytes);
18039        #[allow(clippy::absurd_extreme_comparisons)]
18040        #[allow(unused_comparisons)]
18041        if __tmp.remaining() < Self::ENCODED_LEN {
18042            panic!(
18043                "buffer is too small (need {} bytes, but got {})",
18044                Self::ENCODED_LEN,
18045                __tmp.remaining(),
18046            )
18047        }
18048        __tmp.put_u64_le(self.time_usec);
18049        for val in &self.rpm {
18050            __tmp.put_i32_le(*val);
18051        }
18052        for val in &self.voltage {
18053            __tmp.put_f32_le(*val);
18054        }
18055        for val in &self.current {
18056            __tmp.put_f32_le(*val);
18057        }
18058        __tmp.put_u8(self.index);
18059        if matches!(version, MavlinkVersion::V2) {
18060            let len = __tmp.len();
18061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18062        } else {
18063            __tmp.len()
18064        }
18065    }
18066}
18067#[doc = "id: 436"]
18068#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
18069#[derive(Debug, Clone, PartialEq)]
18070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18072pub struct CURRENT_MODE_DATA {
18073    #[doc = "A bitfield for use for autopilot-specific flags"]
18074    pub custom_mode: u32,
18075    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
18076    pub intended_custom_mode: u32,
18077    #[doc = "Standard mode."]
18078    pub standard_mode: MavStandardMode,
18079}
18080impl CURRENT_MODE_DATA {
18081    pub const ENCODED_LEN: usize = 9usize;
18082    pub const DEFAULT: Self = Self {
18083        custom_mode: 0_u32,
18084        intended_custom_mode: 0_u32,
18085        standard_mode: MavStandardMode::DEFAULT,
18086    };
18087    #[cfg(feature = "arbitrary")]
18088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18089        use arbitrary::{Arbitrary, Unstructured};
18090        let mut buf = [0u8; 1024];
18091        rng.fill_bytes(&mut buf);
18092        let mut unstructured = Unstructured::new(&buf);
18093        Self::arbitrary(&mut unstructured).unwrap_or_default()
18094    }
18095}
18096impl Default for CURRENT_MODE_DATA {
18097    fn default() -> Self {
18098        Self::DEFAULT.clone()
18099    }
18100}
18101impl MessageData for CURRENT_MODE_DATA {
18102    type Message = MavMessage;
18103    const ID: u32 = 436u32;
18104    const NAME: &'static str = "CURRENT_MODE";
18105    const EXTRA_CRC: u8 = 193u8;
18106    const ENCODED_LEN: usize = 9usize;
18107    fn deser(
18108        _version: MavlinkVersion,
18109        __input: &[u8],
18110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18111        let avail_len = __input.len();
18112        let mut payload_buf = [0; Self::ENCODED_LEN];
18113        let mut buf = if avail_len < Self::ENCODED_LEN {
18114            payload_buf[0..avail_len].copy_from_slice(__input);
18115            Bytes::new(&payload_buf)
18116        } else {
18117            Bytes::new(__input)
18118        };
18119        let mut __struct = Self::default();
18120        __struct.custom_mode = buf.get_u32_le();
18121        __struct.intended_custom_mode = buf.get_u32_le();
18122        let tmp = buf.get_u8();
18123        __struct.standard_mode =
18124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18125                enum_type: "MavStandardMode",
18126                value: tmp as u32,
18127            })?;
18128        Ok(__struct)
18129    }
18130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18131        let mut __tmp = BytesMut::new(bytes);
18132        #[allow(clippy::absurd_extreme_comparisons)]
18133        #[allow(unused_comparisons)]
18134        if __tmp.remaining() < Self::ENCODED_LEN {
18135            panic!(
18136                "buffer is too small (need {} bytes, but got {})",
18137                Self::ENCODED_LEN,
18138                __tmp.remaining(),
18139            )
18140        }
18141        __tmp.put_u32_le(self.custom_mode);
18142        __tmp.put_u32_le(self.intended_custom_mode);
18143        __tmp.put_u8(self.standard_mode as u8);
18144        if matches!(version, MavlinkVersion::V2) {
18145            let len = __tmp.len();
18146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18147        } else {
18148            __tmp.len()
18149        }
18150    }
18151}
18152#[doc = "id: 12904"]
18153#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
18154#[derive(Debug, Clone, PartialEq)]
18155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18157pub struct OPEN_DRONE_ID_SYSTEM_DATA {
18158    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
18159    pub operator_latitude: i32,
18160    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
18161    pub operator_longitude: i32,
18162    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
18163    pub area_ceiling: f32,
18164    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
18165    pub area_floor: f32,
18166    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
18167    pub operator_altitude_geo: f32,
18168    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
18169    pub timestamp: u32,
18170    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
18171    pub area_count: u16,
18172    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
18173    pub area_radius: u16,
18174    #[doc = "System ID (0 for broadcast)."]
18175    pub target_system: u8,
18176    #[doc = "Component ID (0 for broadcast)."]
18177    pub target_component: u8,
18178    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
18179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18180    pub id_or_mac: [u8; 20],
18181    #[doc = "Specifies the operator location type."]
18182    pub operator_location_type: MavOdidOperatorLocationType,
18183    #[doc = "Specifies the classification type of the UA."]
18184    pub classification_type: MavOdidClassificationType,
18185    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
18186    pub category_eu: MavOdidCategoryEu,
18187    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
18188    pub class_eu: MavOdidClassEu,
18189}
18190impl OPEN_DRONE_ID_SYSTEM_DATA {
18191    pub const ENCODED_LEN: usize = 54usize;
18192    pub const DEFAULT: Self = Self {
18193        operator_latitude: 0_i32,
18194        operator_longitude: 0_i32,
18195        area_ceiling: 0.0_f32,
18196        area_floor: 0.0_f32,
18197        operator_altitude_geo: 0.0_f32,
18198        timestamp: 0_u32,
18199        area_count: 0_u16,
18200        area_radius: 0_u16,
18201        target_system: 0_u8,
18202        target_component: 0_u8,
18203        id_or_mac: [0_u8; 20usize],
18204        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
18205        classification_type: MavOdidClassificationType::DEFAULT,
18206        category_eu: MavOdidCategoryEu::DEFAULT,
18207        class_eu: MavOdidClassEu::DEFAULT,
18208    };
18209    #[cfg(feature = "arbitrary")]
18210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18211        use arbitrary::{Arbitrary, Unstructured};
18212        let mut buf = [0u8; 1024];
18213        rng.fill_bytes(&mut buf);
18214        let mut unstructured = Unstructured::new(&buf);
18215        Self::arbitrary(&mut unstructured).unwrap_or_default()
18216    }
18217}
18218impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
18219    fn default() -> Self {
18220        Self::DEFAULT.clone()
18221    }
18222}
18223impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
18224    type Message = MavMessage;
18225    const ID: u32 = 12904u32;
18226    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
18227    const EXTRA_CRC: u8 = 77u8;
18228    const ENCODED_LEN: usize = 54usize;
18229    fn deser(
18230        _version: MavlinkVersion,
18231        __input: &[u8],
18232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18233        let avail_len = __input.len();
18234        let mut payload_buf = [0; Self::ENCODED_LEN];
18235        let mut buf = if avail_len < Self::ENCODED_LEN {
18236            payload_buf[0..avail_len].copy_from_slice(__input);
18237            Bytes::new(&payload_buf)
18238        } else {
18239            Bytes::new(__input)
18240        };
18241        let mut __struct = Self::default();
18242        __struct.operator_latitude = buf.get_i32_le();
18243        __struct.operator_longitude = buf.get_i32_le();
18244        __struct.area_ceiling = buf.get_f32_le();
18245        __struct.area_floor = buf.get_f32_le();
18246        __struct.operator_altitude_geo = buf.get_f32_le();
18247        __struct.timestamp = buf.get_u32_le();
18248        __struct.area_count = buf.get_u16_le();
18249        __struct.area_radius = buf.get_u16_le();
18250        __struct.target_system = buf.get_u8();
18251        __struct.target_component = buf.get_u8();
18252        for v in &mut __struct.id_or_mac {
18253            let val = buf.get_u8();
18254            *v = val;
18255        }
18256        let tmp = buf.get_u8();
18257        __struct.operator_location_type =
18258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18259                enum_type: "MavOdidOperatorLocationType",
18260                value: tmp as u32,
18261            })?;
18262        let tmp = buf.get_u8();
18263        __struct.classification_type =
18264            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18265                enum_type: "MavOdidClassificationType",
18266                value: tmp as u32,
18267            })?;
18268        let tmp = buf.get_u8();
18269        __struct.category_eu =
18270            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18271                enum_type: "MavOdidCategoryEu",
18272                value: tmp as u32,
18273            })?;
18274        let tmp = buf.get_u8();
18275        __struct.class_eu =
18276            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18277                enum_type: "MavOdidClassEu",
18278                value: tmp as u32,
18279            })?;
18280        Ok(__struct)
18281    }
18282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18283        let mut __tmp = BytesMut::new(bytes);
18284        #[allow(clippy::absurd_extreme_comparisons)]
18285        #[allow(unused_comparisons)]
18286        if __tmp.remaining() < Self::ENCODED_LEN {
18287            panic!(
18288                "buffer is too small (need {} bytes, but got {})",
18289                Self::ENCODED_LEN,
18290                __tmp.remaining(),
18291            )
18292        }
18293        __tmp.put_i32_le(self.operator_latitude);
18294        __tmp.put_i32_le(self.operator_longitude);
18295        __tmp.put_f32_le(self.area_ceiling);
18296        __tmp.put_f32_le(self.area_floor);
18297        __tmp.put_f32_le(self.operator_altitude_geo);
18298        __tmp.put_u32_le(self.timestamp);
18299        __tmp.put_u16_le(self.area_count);
18300        __tmp.put_u16_le(self.area_radius);
18301        __tmp.put_u8(self.target_system);
18302        __tmp.put_u8(self.target_component);
18303        for val in &self.id_or_mac {
18304            __tmp.put_u8(*val);
18305        }
18306        __tmp.put_u8(self.operator_location_type as u8);
18307        __tmp.put_u8(self.classification_type as u8);
18308        __tmp.put_u8(self.category_eu as u8);
18309        __tmp.put_u8(self.class_eu as u8);
18310        if matches!(version, MavlinkVersion::V2) {
18311            let len = __tmp.len();
18312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18313        } else {
18314            __tmp.len()
18315        }
18316    }
18317}
18318#[doc = "id: 7"]
18319#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
18320#[derive(Debug, Clone, PartialEq)]
18321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18323pub struct AUTH_KEY_DATA {
18324    #[doc = "key"]
18325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18326    pub key: [u8; 32],
18327}
18328impl AUTH_KEY_DATA {
18329    pub const ENCODED_LEN: usize = 32usize;
18330    pub const DEFAULT: Self = Self {
18331        key: [0_u8; 32usize],
18332    };
18333    #[cfg(feature = "arbitrary")]
18334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18335        use arbitrary::{Arbitrary, Unstructured};
18336        let mut buf = [0u8; 1024];
18337        rng.fill_bytes(&mut buf);
18338        let mut unstructured = Unstructured::new(&buf);
18339        Self::arbitrary(&mut unstructured).unwrap_or_default()
18340    }
18341}
18342impl Default for AUTH_KEY_DATA {
18343    fn default() -> Self {
18344        Self::DEFAULT.clone()
18345    }
18346}
18347impl MessageData for AUTH_KEY_DATA {
18348    type Message = MavMessage;
18349    const ID: u32 = 7u32;
18350    const NAME: &'static str = "AUTH_KEY";
18351    const EXTRA_CRC: u8 = 119u8;
18352    const ENCODED_LEN: usize = 32usize;
18353    fn deser(
18354        _version: MavlinkVersion,
18355        __input: &[u8],
18356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18357        let avail_len = __input.len();
18358        let mut payload_buf = [0; Self::ENCODED_LEN];
18359        let mut buf = if avail_len < Self::ENCODED_LEN {
18360            payload_buf[0..avail_len].copy_from_slice(__input);
18361            Bytes::new(&payload_buf)
18362        } else {
18363            Bytes::new(__input)
18364        };
18365        let mut __struct = Self::default();
18366        for v in &mut __struct.key {
18367            let val = buf.get_u8();
18368            *v = val;
18369        }
18370        Ok(__struct)
18371    }
18372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18373        let mut __tmp = BytesMut::new(bytes);
18374        #[allow(clippy::absurd_extreme_comparisons)]
18375        #[allow(unused_comparisons)]
18376        if __tmp.remaining() < Self::ENCODED_LEN {
18377            panic!(
18378                "buffer is too small (need {} bytes, but got {})",
18379                Self::ENCODED_LEN,
18380                __tmp.remaining(),
18381            )
18382        }
18383        for val in &self.key {
18384            __tmp.put_u8(*val);
18385        }
18386        if matches!(version, MavlinkVersion::V2) {
18387            let len = __tmp.len();
18388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18389        } else {
18390            __tmp.len()
18391        }
18392    }
18393}
18394#[doc = "id: 266"]
18395#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18396#[derive(Debug, Clone, PartialEq)]
18397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18399pub struct LOGGING_DATA_DATA {
18400    #[doc = "sequence number (can wrap)"]
18401    pub sequence: u16,
18402    #[doc = "system ID of the target"]
18403    pub target_system: u8,
18404    #[doc = "component ID of the target"]
18405    pub target_component: u8,
18406    #[doc = "data length"]
18407    pub length: u8,
18408    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18409    pub first_message_offset: u8,
18410    #[doc = "logged data"]
18411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18412    pub data: [u8; 249],
18413}
18414impl LOGGING_DATA_DATA {
18415    pub const ENCODED_LEN: usize = 255usize;
18416    pub const DEFAULT: Self = Self {
18417        sequence: 0_u16,
18418        target_system: 0_u8,
18419        target_component: 0_u8,
18420        length: 0_u8,
18421        first_message_offset: 0_u8,
18422        data: [0_u8; 249usize],
18423    };
18424    #[cfg(feature = "arbitrary")]
18425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18426        use arbitrary::{Arbitrary, Unstructured};
18427        let mut buf = [0u8; 1024];
18428        rng.fill_bytes(&mut buf);
18429        let mut unstructured = Unstructured::new(&buf);
18430        Self::arbitrary(&mut unstructured).unwrap_or_default()
18431    }
18432}
18433impl Default for LOGGING_DATA_DATA {
18434    fn default() -> Self {
18435        Self::DEFAULT.clone()
18436    }
18437}
18438impl MessageData for LOGGING_DATA_DATA {
18439    type Message = MavMessage;
18440    const ID: u32 = 266u32;
18441    const NAME: &'static str = "LOGGING_DATA";
18442    const EXTRA_CRC: u8 = 193u8;
18443    const ENCODED_LEN: usize = 255usize;
18444    fn deser(
18445        _version: MavlinkVersion,
18446        __input: &[u8],
18447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18448        let avail_len = __input.len();
18449        let mut payload_buf = [0; Self::ENCODED_LEN];
18450        let mut buf = if avail_len < Self::ENCODED_LEN {
18451            payload_buf[0..avail_len].copy_from_slice(__input);
18452            Bytes::new(&payload_buf)
18453        } else {
18454            Bytes::new(__input)
18455        };
18456        let mut __struct = Self::default();
18457        __struct.sequence = buf.get_u16_le();
18458        __struct.target_system = buf.get_u8();
18459        __struct.target_component = buf.get_u8();
18460        __struct.length = buf.get_u8();
18461        __struct.first_message_offset = buf.get_u8();
18462        for v in &mut __struct.data {
18463            let val = buf.get_u8();
18464            *v = val;
18465        }
18466        Ok(__struct)
18467    }
18468    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18469        let mut __tmp = BytesMut::new(bytes);
18470        #[allow(clippy::absurd_extreme_comparisons)]
18471        #[allow(unused_comparisons)]
18472        if __tmp.remaining() < Self::ENCODED_LEN {
18473            panic!(
18474                "buffer is too small (need {} bytes, but got {})",
18475                Self::ENCODED_LEN,
18476                __tmp.remaining(),
18477            )
18478        }
18479        __tmp.put_u16_le(self.sequence);
18480        __tmp.put_u8(self.target_system);
18481        __tmp.put_u8(self.target_component);
18482        __tmp.put_u8(self.length);
18483        __tmp.put_u8(self.first_message_offset);
18484        for val in &self.data {
18485            __tmp.put_u8(*val);
18486        }
18487        if matches!(version, MavlinkVersion::V2) {
18488            let len = __tmp.len();
18489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18490        } else {
18491            __tmp.len()
18492        }
18493    }
18494}
18495#[doc = "id: 440"]
18496#[doc = "Illuminator status."]
18497#[derive(Debug, Clone, PartialEq)]
18498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18500pub struct ILLUMINATOR_STATUS_DATA {
18501    #[doc = "Time since the start-up of the illuminator in ms"]
18502    pub uptime_ms: u32,
18503    #[doc = "Errors"]
18504    pub error_status: IlluminatorErrorFlags,
18505    #[doc = "Illuminator brightness"]
18506    pub brightness: f32,
18507    #[doc = "Illuminator strobing period in seconds"]
18508    pub strobe_period: f32,
18509    #[doc = "Illuminator strobing duty cycle"]
18510    pub strobe_duty_cycle: f32,
18511    #[doc = "Temperature in Celsius"]
18512    pub temp_c: f32,
18513    #[doc = "Minimum strobing period in seconds"]
18514    pub min_strobe_period: f32,
18515    #[doc = "Maximum strobing period in seconds"]
18516    pub max_strobe_period: f32,
18517    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
18518    pub enable: u8,
18519    #[doc = "Supported illuminator modes"]
18520    pub mode_bitmask: IlluminatorMode,
18521    #[doc = "Illuminator mode"]
18522    pub mode: IlluminatorMode,
18523}
18524impl ILLUMINATOR_STATUS_DATA {
18525    pub const ENCODED_LEN: usize = 35usize;
18526    pub const DEFAULT: Self = Self {
18527        uptime_ms: 0_u32,
18528        error_status: IlluminatorErrorFlags::DEFAULT,
18529        brightness: 0.0_f32,
18530        strobe_period: 0.0_f32,
18531        strobe_duty_cycle: 0.0_f32,
18532        temp_c: 0.0_f32,
18533        min_strobe_period: 0.0_f32,
18534        max_strobe_period: 0.0_f32,
18535        enable: 0_u8,
18536        mode_bitmask: IlluminatorMode::DEFAULT,
18537        mode: IlluminatorMode::DEFAULT,
18538    };
18539    #[cfg(feature = "arbitrary")]
18540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18541        use arbitrary::{Arbitrary, Unstructured};
18542        let mut buf = [0u8; 1024];
18543        rng.fill_bytes(&mut buf);
18544        let mut unstructured = Unstructured::new(&buf);
18545        Self::arbitrary(&mut unstructured).unwrap_or_default()
18546    }
18547}
18548impl Default for ILLUMINATOR_STATUS_DATA {
18549    fn default() -> Self {
18550        Self::DEFAULT.clone()
18551    }
18552}
18553impl MessageData for ILLUMINATOR_STATUS_DATA {
18554    type Message = MavMessage;
18555    const ID: u32 = 440u32;
18556    const NAME: &'static str = "ILLUMINATOR_STATUS";
18557    const EXTRA_CRC: u8 = 66u8;
18558    const ENCODED_LEN: usize = 35usize;
18559    fn deser(
18560        _version: MavlinkVersion,
18561        __input: &[u8],
18562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18563        let avail_len = __input.len();
18564        let mut payload_buf = [0; Self::ENCODED_LEN];
18565        let mut buf = if avail_len < Self::ENCODED_LEN {
18566            payload_buf[0..avail_len].copy_from_slice(__input);
18567            Bytes::new(&payload_buf)
18568        } else {
18569            Bytes::new(__input)
18570        };
18571        let mut __struct = Self::default();
18572        __struct.uptime_ms = buf.get_u32_le();
18573        let tmp = buf.get_u32_le();
18574        __struct.error_status = IlluminatorErrorFlags::from_bits(
18575            tmp & IlluminatorErrorFlags::all().bits(),
18576        )
18577        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18578            flag_type: "IlluminatorErrorFlags",
18579            value: tmp as u32,
18580        })?;
18581        __struct.brightness = buf.get_f32_le();
18582        __struct.strobe_period = buf.get_f32_le();
18583        __struct.strobe_duty_cycle = buf.get_f32_le();
18584        __struct.temp_c = buf.get_f32_le();
18585        __struct.min_strobe_period = buf.get_f32_le();
18586        __struct.max_strobe_period = buf.get_f32_le();
18587        __struct.enable = buf.get_u8();
18588        let tmp = buf.get_u8();
18589        __struct.mode_bitmask =
18590            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18591                enum_type: "IlluminatorMode",
18592                value: tmp as u32,
18593            })?;
18594        let tmp = buf.get_u8();
18595        __struct.mode =
18596            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18597                enum_type: "IlluminatorMode",
18598                value: tmp as u32,
18599            })?;
18600        Ok(__struct)
18601    }
18602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18603        let mut __tmp = BytesMut::new(bytes);
18604        #[allow(clippy::absurd_extreme_comparisons)]
18605        #[allow(unused_comparisons)]
18606        if __tmp.remaining() < Self::ENCODED_LEN {
18607            panic!(
18608                "buffer is too small (need {} bytes, but got {})",
18609                Self::ENCODED_LEN,
18610                __tmp.remaining(),
18611            )
18612        }
18613        __tmp.put_u32_le(self.uptime_ms);
18614        __tmp.put_u32_le(self.error_status.bits());
18615        __tmp.put_f32_le(self.brightness);
18616        __tmp.put_f32_le(self.strobe_period);
18617        __tmp.put_f32_le(self.strobe_duty_cycle);
18618        __tmp.put_f32_le(self.temp_c);
18619        __tmp.put_f32_le(self.min_strobe_period);
18620        __tmp.put_f32_le(self.max_strobe_period);
18621        __tmp.put_u8(self.enable);
18622        __tmp.put_u8(self.mode_bitmask as u8);
18623        __tmp.put_u8(self.mode as u8);
18624        if matches!(version, MavlinkVersion::V2) {
18625            let len = __tmp.len();
18626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18627        } else {
18628            __tmp.len()
18629        }
18630    }
18631}
18632#[doc = "id: 277"]
18633#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
18634#[derive(Debug, Clone, PartialEq)]
18635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18637pub struct CAMERA_THERMAL_RANGE_DATA {
18638    #[doc = "Timestamp (time since system boot)."]
18639    pub time_boot_ms: u32,
18640    #[doc = "Temperature max."]
18641    pub max: f32,
18642    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
18643    pub max_point_x: f32,
18644    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
18645    pub max_point_y: f32,
18646    #[doc = "Temperature min."]
18647    pub min: f32,
18648    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
18649    pub min_point_x: f32,
18650    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
18651    pub min_point_y: f32,
18652    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
18653    pub stream_id: u8,
18654    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
18655    pub camera_device_id: u8,
18656}
18657impl CAMERA_THERMAL_RANGE_DATA {
18658    pub const ENCODED_LEN: usize = 30usize;
18659    pub const DEFAULT: Self = Self {
18660        time_boot_ms: 0_u32,
18661        max: 0.0_f32,
18662        max_point_x: 0.0_f32,
18663        max_point_y: 0.0_f32,
18664        min: 0.0_f32,
18665        min_point_x: 0.0_f32,
18666        min_point_y: 0.0_f32,
18667        stream_id: 0_u8,
18668        camera_device_id: 0_u8,
18669    };
18670    #[cfg(feature = "arbitrary")]
18671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18672        use arbitrary::{Arbitrary, Unstructured};
18673        let mut buf = [0u8; 1024];
18674        rng.fill_bytes(&mut buf);
18675        let mut unstructured = Unstructured::new(&buf);
18676        Self::arbitrary(&mut unstructured).unwrap_or_default()
18677    }
18678}
18679impl Default for CAMERA_THERMAL_RANGE_DATA {
18680    fn default() -> Self {
18681        Self::DEFAULT.clone()
18682    }
18683}
18684impl MessageData for CAMERA_THERMAL_RANGE_DATA {
18685    type Message = MavMessage;
18686    const ID: u32 = 277u32;
18687    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
18688    const EXTRA_CRC: u8 = 62u8;
18689    const ENCODED_LEN: usize = 30usize;
18690    fn deser(
18691        _version: MavlinkVersion,
18692        __input: &[u8],
18693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18694        let avail_len = __input.len();
18695        let mut payload_buf = [0; Self::ENCODED_LEN];
18696        let mut buf = if avail_len < Self::ENCODED_LEN {
18697            payload_buf[0..avail_len].copy_from_slice(__input);
18698            Bytes::new(&payload_buf)
18699        } else {
18700            Bytes::new(__input)
18701        };
18702        let mut __struct = Self::default();
18703        __struct.time_boot_ms = buf.get_u32_le();
18704        __struct.max = buf.get_f32_le();
18705        __struct.max_point_x = buf.get_f32_le();
18706        __struct.max_point_y = buf.get_f32_le();
18707        __struct.min = buf.get_f32_le();
18708        __struct.min_point_x = buf.get_f32_le();
18709        __struct.min_point_y = buf.get_f32_le();
18710        __struct.stream_id = buf.get_u8();
18711        __struct.camera_device_id = buf.get_u8();
18712        Ok(__struct)
18713    }
18714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18715        let mut __tmp = BytesMut::new(bytes);
18716        #[allow(clippy::absurd_extreme_comparisons)]
18717        #[allow(unused_comparisons)]
18718        if __tmp.remaining() < Self::ENCODED_LEN {
18719            panic!(
18720                "buffer is too small (need {} bytes, but got {})",
18721                Self::ENCODED_LEN,
18722                __tmp.remaining(),
18723            )
18724        }
18725        __tmp.put_u32_le(self.time_boot_ms);
18726        __tmp.put_f32_le(self.max);
18727        __tmp.put_f32_le(self.max_point_x);
18728        __tmp.put_f32_le(self.max_point_y);
18729        __tmp.put_f32_le(self.min);
18730        __tmp.put_f32_le(self.min_point_x);
18731        __tmp.put_f32_le(self.min_point_y);
18732        __tmp.put_u8(self.stream_id);
18733        __tmp.put_u8(self.camera_device_id);
18734        if matches!(version, MavlinkVersion::V2) {
18735            let len = __tmp.len();
18736            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18737        } else {
18738            __tmp.len()
18739        }
18740    }
18741}
18742#[doc = "id: 290"]
18743#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
18744#[derive(Debug, Clone, PartialEq)]
18745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18747pub struct ESC_INFO_DATA {
18748    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
18749    pub time_usec: u64,
18750    #[doc = "Number of reported errors by each ESC since boot."]
18751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18752    pub error_count: [u32; 4],
18753    #[doc = "Counter of data packets received."]
18754    pub counter: u16,
18755    #[doc = "Bitmap of ESC failure flags."]
18756    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18757    pub failure_flags: [u16; 4],
18758    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
18759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18760    pub temperature: [i16; 4],
18761    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
18762    pub index: u8,
18763    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
18764    pub count: u8,
18765    #[doc = "Connection type protocol for all ESC."]
18766    pub connection_type: EscConnectionType,
18767    #[doc = "Information regarding online/offline status of each ESC."]
18768    pub info: u8,
18769}
18770impl ESC_INFO_DATA {
18771    pub const ENCODED_LEN: usize = 46usize;
18772    pub const DEFAULT: Self = Self {
18773        time_usec: 0_u64,
18774        error_count: [0_u32; 4usize],
18775        counter: 0_u16,
18776        failure_flags: [0_u16; 4usize],
18777        temperature: [0_i16; 4usize],
18778        index: 0_u8,
18779        count: 0_u8,
18780        connection_type: EscConnectionType::DEFAULT,
18781        info: 0_u8,
18782    };
18783    #[cfg(feature = "arbitrary")]
18784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18785        use arbitrary::{Arbitrary, Unstructured};
18786        let mut buf = [0u8; 1024];
18787        rng.fill_bytes(&mut buf);
18788        let mut unstructured = Unstructured::new(&buf);
18789        Self::arbitrary(&mut unstructured).unwrap_or_default()
18790    }
18791}
18792impl Default for ESC_INFO_DATA {
18793    fn default() -> Self {
18794        Self::DEFAULT.clone()
18795    }
18796}
18797impl MessageData for ESC_INFO_DATA {
18798    type Message = MavMessage;
18799    const ID: u32 = 290u32;
18800    const NAME: &'static str = "ESC_INFO";
18801    const EXTRA_CRC: u8 = 251u8;
18802    const ENCODED_LEN: usize = 46usize;
18803    fn deser(
18804        _version: MavlinkVersion,
18805        __input: &[u8],
18806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18807        let avail_len = __input.len();
18808        let mut payload_buf = [0; Self::ENCODED_LEN];
18809        let mut buf = if avail_len < Self::ENCODED_LEN {
18810            payload_buf[0..avail_len].copy_from_slice(__input);
18811            Bytes::new(&payload_buf)
18812        } else {
18813            Bytes::new(__input)
18814        };
18815        let mut __struct = Self::default();
18816        __struct.time_usec = buf.get_u64_le();
18817        for v in &mut __struct.error_count {
18818            let val = buf.get_u32_le();
18819            *v = val;
18820        }
18821        __struct.counter = buf.get_u16_le();
18822        for v in &mut __struct.failure_flags {
18823            let val = buf.get_u16_le();
18824            *v = val;
18825        }
18826        for v in &mut __struct.temperature {
18827            let val = buf.get_i16_le();
18828            *v = val;
18829        }
18830        __struct.index = buf.get_u8();
18831        __struct.count = buf.get_u8();
18832        let tmp = buf.get_u8();
18833        __struct.connection_type =
18834            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18835                enum_type: "EscConnectionType",
18836                value: tmp as u32,
18837            })?;
18838        __struct.info = buf.get_u8();
18839        Ok(__struct)
18840    }
18841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18842        let mut __tmp = BytesMut::new(bytes);
18843        #[allow(clippy::absurd_extreme_comparisons)]
18844        #[allow(unused_comparisons)]
18845        if __tmp.remaining() < Self::ENCODED_LEN {
18846            panic!(
18847                "buffer is too small (need {} bytes, but got {})",
18848                Self::ENCODED_LEN,
18849                __tmp.remaining(),
18850            )
18851        }
18852        __tmp.put_u64_le(self.time_usec);
18853        for val in &self.error_count {
18854            __tmp.put_u32_le(*val);
18855        }
18856        __tmp.put_u16_le(self.counter);
18857        for val in &self.failure_flags {
18858            __tmp.put_u16_le(*val);
18859        }
18860        for val in &self.temperature {
18861            __tmp.put_i16_le(*val);
18862        }
18863        __tmp.put_u8(self.index);
18864        __tmp.put_u8(self.count);
18865        __tmp.put_u8(self.connection_type as u8);
18866        __tmp.put_u8(self.info);
18867        if matches!(version, MavlinkVersion::V2) {
18868            let len = __tmp.len();
18869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18870        } else {
18871            __tmp.len()
18872        }
18873    }
18874}
18875#[doc = "id: 339"]
18876#[doc = "RPM sensor data message."]
18877#[derive(Debug, Clone, PartialEq)]
18878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18880pub struct RAW_RPM_DATA {
18881    #[doc = "Indicated rate"]
18882    pub frequency: f32,
18883    #[doc = "Index of this RPM sensor (0-indexed)"]
18884    pub index: u8,
18885}
18886impl RAW_RPM_DATA {
18887    pub const ENCODED_LEN: usize = 5usize;
18888    pub const DEFAULT: Self = Self {
18889        frequency: 0.0_f32,
18890        index: 0_u8,
18891    };
18892    #[cfg(feature = "arbitrary")]
18893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18894        use arbitrary::{Arbitrary, Unstructured};
18895        let mut buf = [0u8; 1024];
18896        rng.fill_bytes(&mut buf);
18897        let mut unstructured = Unstructured::new(&buf);
18898        Self::arbitrary(&mut unstructured).unwrap_or_default()
18899    }
18900}
18901impl Default for RAW_RPM_DATA {
18902    fn default() -> Self {
18903        Self::DEFAULT.clone()
18904    }
18905}
18906impl MessageData for RAW_RPM_DATA {
18907    type Message = MavMessage;
18908    const ID: u32 = 339u32;
18909    const NAME: &'static str = "RAW_RPM";
18910    const EXTRA_CRC: u8 = 199u8;
18911    const ENCODED_LEN: usize = 5usize;
18912    fn deser(
18913        _version: MavlinkVersion,
18914        __input: &[u8],
18915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18916        let avail_len = __input.len();
18917        let mut payload_buf = [0; Self::ENCODED_LEN];
18918        let mut buf = if avail_len < Self::ENCODED_LEN {
18919            payload_buf[0..avail_len].copy_from_slice(__input);
18920            Bytes::new(&payload_buf)
18921        } else {
18922            Bytes::new(__input)
18923        };
18924        let mut __struct = Self::default();
18925        __struct.frequency = buf.get_f32_le();
18926        __struct.index = buf.get_u8();
18927        Ok(__struct)
18928    }
18929    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18930        let mut __tmp = BytesMut::new(bytes);
18931        #[allow(clippy::absurd_extreme_comparisons)]
18932        #[allow(unused_comparisons)]
18933        if __tmp.remaining() < Self::ENCODED_LEN {
18934            panic!(
18935                "buffer is too small (need {} bytes, but got {})",
18936                Self::ENCODED_LEN,
18937                __tmp.remaining(),
18938            )
18939        }
18940        __tmp.put_f32_le(self.frequency);
18941        __tmp.put_u8(self.index);
18942        if matches!(version, MavlinkVersion::V2) {
18943            let len = __tmp.len();
18944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18945        } else {
18946            __tmp.len()
18947        }
18948    }
18949}
18950#[doc = "id: 122"]
18951#[doc = "Stop log transfer and resume normal logging."]
18952#[derive(Debug, Clone, PartialEq)]
18953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18955pub struct LOG_REQUEST_END_DATA {
18956    #[doc = "System ID"]
18957    pub target_system: u8,
18958    #[doc = "Component ID"]
18959    pub target_component: u8,
18960}
18961impl LOG_REQUEST_END_DATA {
18962    pub const ENCODED_LEN: usize = 2usize;
18963    pub const DEFAULT: Self = Self {
18964        target_system: 0_u8,
18965        target_component: 0_u8,
18966    };
18967    #[cfg(feature = "arbitrary")]
18968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18969        use arbitrary::{Arbitrary, Unstructured};
18970        let mut buf = [0u8; 1024];
18971        rng.fill_bytes(&mut buf);
18972        let mut unstructured = Unstructured::new(&buf);
18973        Self::arbitrary(&mut unstructured).unwrap_or_default()
18974    }
18975}
18976impl Default for LOG_REQUEST_END_DATA {
18977    fn default() -> Self {
18978        Self::DEFAULT.clone()
18979    }
18980}
18981impl MessageData for LOG_REQUEST_END_DATA {
18982    type Message = MavMessage;
18983    const ID: u32 = 122u32;
18984    const NAME: &'static str = "LOG_REQUEST_END";
18985    const EXTRA_CRC: u8 = 203u8;
18986    const ENCODED_LEN: usize = 2usize;
18987    fn deser(
18988        _version: MavlinkVersion,
18989        __input: &[u8],
18990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18991        let avail_len = __input.len();
18992        let mut payload_buf = [0; Self::ENCODED_LEN];
18993        let mut buf = if avail_len < Self::ENCODED_LEN {
18994            payload_buf[0..avail_len].copy_from_slice(__input);
18995            Bytes::new(&payload_buf)
18996        } else {
18997            Bytes::new(__input)
18998        };
18999        let mut __struct = Self::default();
19000        __struct.target_system = buf.get_u8();
19001        __struct.target_component = buf.get_u8();
19002        Ok(__struct)
19003    }
19004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19005        let mut __tmp = BytesMut::new(bytes);
19006        #[allow(clippy::absurd_extreme_comparisons)]
19007        #[allow(unused_comparisons)]
19008        if __tmp.remaining() < Self::ENCODED_LEN {
19009            panic!(
19010                "buffer is too small (need {} bytes, but got {})",
19011                Self::ENCODED_LEN,
19012                __tmp.remaining(),
19013            )
19014        }
19015        __tmp.put_u8(self.target_system);
19016        __tmp.put_u8(self.target_component);
19017        if matches!(version, MavlinkVersion::V2) {
19018            let len = __tmp.len();
19019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19020        } else {
19021            __tmp.len()
19022        }
19023    }
19024}
19025#[doc = "id: 385"]
19026#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
19027#[derive(Debug, Clone, PartialEq)]
19028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19030pub struct TUNNEL_DATA {
19031    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
19032    pub payload_type: MavTunnelPayloadType,
19033    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
19034    pub target_system: u8,
19035    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
19036    pub target_component: u8,
19037    #[doc = "Length of the data transported in payload"]
19038    pub payload_length: u8,
19039    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
19040    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19041    pub payload: [u8; 128],
19042}
19043impl TUNNEL_DATA {
19044    pub const ENCODED_LEN: usize = 133usize;
19045    pub const DEFAULT: Self = Self {
19046        payload_type: MavTunnelPayloadType::DEFAULT,
19047        target_system: 0_u8,
19048        target_component: 0_u8,
19049        payload_length: 0_u8,
19050        payload: [0_u8; 128usize],
19051    };
19052    #[cfg(feature = "arbitrary")]
19053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19054        use arbitrary::{Arbitrary, Unstructured};
19055        let mut buf = [0u8; 1024];
19056        rng.fill_bytes(&mut buf);
19057        let mut unstructured = Unstructured::new(&buf);
19058        Self::arbitrary(&mut unstructured).unwrap_or_default()
19059    }
19060}
19061impl Default for TUNNEL_DATA {
19062    fn default() -> Self {
19063        Self::DEFAULT.clone()
19064    }
19065}
19066impl MessageData for TUNNEL_DATA {
19067    type Message = MavMessage;
19068    const ID: u32 = 385u32;
19069    const NAME: &'static str = "TUNNEL";
19070    const EXTRA_CRC: u8 = 147u8;
19071    const ENCODED_LEN: usize = 133usize;
19072    fn deser(
19073        _version: MavlinkVersion,
19074        __input: &[u8],
19075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19076        let avail_len = __input.len();
19077        let mut payload_buf = [0; Self::ENCODED_LEN];
19078        let mut buf = if avail_len < Self::ENCODED_LEN {
19079            payload_buf[0..avail_len].copy_from_slice(__input);
19080            Bytes::new(&payload_buf)
19081        } else {
19082            Bytes::new(__input)
19083        };
19084        let mut __struct = Self::default();
19085        let tmp = buf.get_u16_le();
19086        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
19087            ::mavlink_core::error::ParserError::InvalidEnum {
19088                enum_type: "MavTunnelPayloadType",
19089                value: tmp as u32,
19090            },
19091        )?;
19092        __struct.target_system = buf.get_u8();
19093        __struct.target_component = buf.get_u8();
19094        __struct.payload_length = buf.get_u8();
19095        for v in &mut __struct.payload {
19096            let val = buf.get_u8();
19097            *v = val;
19098        }
19099        Ok(__struct)
19100    }
19101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19102        let mut __tmp = BytesMut::new(bytes);
19103        #[allow(clippy::absurd_extreme_comparisons)]
19104        #[allow(unused_comparisons)]
19105        if __tmp.remaining() < Self::ENCODED_LEN {
19106            panic!(
19107                "buffer is too small (need {} bytes, but got {})",
19108                Self::ENCODED_LEN,
19109                __tmp.remaining(),
19110            )
19111        }
19112        __tmp.put_u16_le(self.payload_type as u16);
19113        __tmp.put_u8(self.target_system);
19114        __tmp.put_u8(self.target_component);
19115        __tmp.put_u8(self.payload_length);
19116        for val in &self.payload {
19117            __tmp.put_u8(*val);
19118        }
19119        if matches!(version, MavlinkVersion::V2) {
19120            let len = __tmp.len();
19121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19122        } else {
19123            __tmp.len()
19124        }
19125    }
19126}
19127#[doc = "id: 62"]
19128#[doc = "The state of the navigation and position controller."]
19129#[derive(Debug, Clone, PartialEq)]
19130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19132pub struct NAV_CONTROLLER_OUTPUT_DATA {
19133    #[doc = "Current desired roll"]
19134    pub nav_roll: f32,
19135    #[doc = "Current desired pitch"]
19136    pub nav_pitch: f32,
19137    #[doc = "Current altitude error"]
19138    pub alt_error: f32,
19139    #[doc = "Current airspeed error"]
19140    pub aspd_error: f32,
19141    #[doc = "Current crosstrack error on x-y plane"]
19142    pub xtrack_error: f32,
19143    #[doc = "Current desired heading"]
19144    pub nav_bearing: i16,
19145    #[doc = "Bearing to current waypoint/target"]
19146    pub target_bearing: i16,
19147    #[doc = "Distance to active waypoint"]
19148    pub wp_dist: u16,
19149}
19150impl NAV_CONTROLLER_OUTPUT_DATA {
19151    pub const ENCODED_LEN: usize = 26usize;
19152    pub const DEFAULT: Self = Self {
19153        nav_roll: 0.0_f32,
19154        nav_pitch: 0.0_f32,
19155        alt_error: 0.0_f32,
19156        aspd_error: 0.0_f32,
19157        xtrack_error: 0.0_f32,
19158        nav_bearing: 0_i16,
19159        target_bearing: 0_i16,
19160        wp_dist: 0_u16,
19161    };
19162    #[cfg(feature = "arbitrary")]
19163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19164        use arbitrary::{Arbitrary, Unstructured};
19165        let mut buf = [0u8; 1024];
19166        rng.fill_bytes(&mut buf);
19167        let mut unstructured = Unstructured::new(&buf);
19168        Self::arbitrary(&mut unstructured).unwrap_or_default()
19169    }
19170}
19171impl Default for NAV_CONTROLLER_OUTPUT_DATA {
19172    fn default() -> Self {
19173        Self::DEFAULT.clone()
19174    }
19175}
19176impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
19177    type Message = MavMessage;
19178    const ID: u32 = 62u32;
19179    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
19180    const EXTRA_CRC: u8 = 183u8;
19181    const ENCODED_LEN: usize = 26usize;
19182    fn deser(
19183        _version: MavlinkVersion,
19184        __input: &[u8],
19185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19186        let avail_len = __input.len();
19187        let mut payload_buf = [0; Self::ENCODED_LEN];
19188        let mut buf = if avail_len < Self::ENCODED_LEN {
19189            payload_buf[0..avail_len].copy_from_slice(__input);
19190            Bytes::new(&payload_buf)
19191        } else {
19192            Bytes::new(__input)
19193        };
19194        let mut __struct = Self::default();
19195        __struct.nav_roll = buf.get_f32_le();
19196        __struct.nav_pitch = buf.get_f32_le();
19197        __struct.alt_error = buf.get_f32_le();
19198        __struct.aspd_error = buf.get_f32_le();
19199        __struct.xtrack_error = buf.get_f32_le();
19200        __struct.nav_bearing = buf.get_i16_le();
19201        __struct.target_bearing = buf.get_i16_le();
19202        __struct.wp_dist = buf.get_u16_le();
19203        Ok(__struct)
19204    }
19205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19206        let mut __tmp = BytesMut::new(bytes);
19207        #[allow(clippy::absurd_extreme_comparisons)]
19208        #[allow(unused_comparisons)]
19209        if __tmp.remaining() < Self::ENCODED_LEN {
19210            panic!(
19211                "buffer is too small (need {} bytes, but got {})",
19212                Self::ENCODED_LEN,
19213                __tmp.remaining(),
19214            )
19215        }
19216        __tmp.put_f32_le(self.nav_roll);
19217        __tmp.put_f32_le(self.nav_pitch);
19218        __tmp.put_f32_le(self.alt_error);
19219        __tmp.put_f32_le(self.aspd_error);
19220        __tmp.put_f32_le(self.xtrack_error);
19221        __tmp.put_i16_le(self.nav_bearing);
19222        __tmp.put_i16_le(self.target_bearing);
19223        __tmp.put_u16_le(self.wp_dist);
19224        if matches!(version, MavlinkVersion::V2) {
19225            let len = __tmp.len();
19226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19227        } else {
19228            __tmp.len()
19229        }
19230    }
19231}
19232#[doc = "id: 247"]
19233#[doc = "Information about a potential collision."]
19234#[derive(Debug, Clone, PartialEq)]
19235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19237pub struct COLLISION_DATA {
19238    #[doc = "Unique identifier, domain based on src field"]
19239    pub id: u32,
19240    #[doc = "Estimated time until collision occurs"]
19241    pub time_to_minimum_delta: f32,
19242    #[doc = "Closest vertical distance between vehicle and object"]
19243    pub altitude_minimum_delta: f32,
19244    #[doc = "Closest horizontal distance between vehicle and object"]
19245    pub horizontal_minimum_delta: f32,
19246    #[doc = "Collision data source"]
19247    pub src: MavCollisionSrc,
19248    #[doc = "Action that is being taken to avoid this collision"]
19249    pub action: MavCollisionAction,
19250    #[doc = "How concerned the aircraft is about this collision"]
19251    pub threat_level: MavCollisionThreatLevel,
19252}
19253impl COLLISION_DATA {
19254    pub const ENCODED_LEN: usize = 19usize;
19255    pub const DEFAULT: Self = Self {
19256        id: 0_u32,
19257        time_to_minimum_delta: 0.0_f32,
19258        altitude_minimum_delta: 0.0_f32,
19259        horizontal_minimum_delta: 0.0_f32,
19260        src: MavCollisionSrc::DEFAULT,
19261        action: MavCollisionAction::DEFAULT,
19262        threat_level: MavCollisionThreatLevel::DEFAULT,
19263    };
19264    #[cfg(feature = "arbitrary")]
19265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19266        use arbitrary::{Arbitrary, Unstructured};
19267        let mut buf = [0u8; 1024];
19268        rng.fill_bytes(&mut buf);
19269        let mut unstructured = Unstructured::new(&buf);
19270        Self::arbitrary(&mut unstructured).unwrap_or_default()
19271    }
19272}
19273impl Default for COLLISION_DATA {
19274    fn default() -> Self {
19275        Self::DEFAULT.clone()
19276    }
19277}
19278impl MessageData for COLLISION_DATA {
19279    type Message = MavMessage;
19280    const ID: u32 = 247u32;
19281    const NAME: &'static str = "COLLISION";
19282    const EXTRA_CRC: u8 = 81u8;
19283    const ENCODED_LEN: usize = 19usize;
19284    fn deser(
19285        _version: MavlinkVersion,
19286        __input: &[u8],
19287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19288        let avail_len = __input.len();
19289        let mut payload_buf = [0; Self::ENCODED_LEN];
19290        let mut buf = if avail_len < Self::ENCODED_LEN {
19291            payload_buf[0..avail_len].copy_from_slice(__input);
19292            Bytes::new(&payload_buf)
19293        } else {
19294            Bytes::new(__input)
19295        };
19296        let mut __struct = Self::default();
19297        __struct.id = buf.get_u32_le();
19298        __struct.time_to_minimum_delta = buf.get_f32_le();
19299        __struct.altitude_minimum_delta = buf.get_f32_le();
19300        __struct.horizontal_minimum_delta = buf.get_f32_le();
19301        let tmp = buf.get_u8();
19302        __struct.src =
19303            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19304                enum_type: "MavCollisionSrc",
19305                value: tmp as u32,
19306            })?;
19307        let tmp = buf.get_u8();
19308        __struct.action =
19309            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19310                enum_type: "MavCollisionAction",
19311                value: tmp as u32,
19312            })?;
19313        let tmp = buf.get_u8();
19314        __struct.threat_level =
19315            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19316                enum_type: "MavCollisionThreatLevel",
19317                value: tmp as u32,
19318            })?;
19319        Ok(__struct)
19320    }
19321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19322        let mut __tmp = BytesMut::new(bytes);
19323        #[allow(clippy::absurd_extreme_comparisons)]
19324        #[allow(unused_comparisons)]
19325        if __tmp.remaining() < Self::ENCODED_LEN {
19326            panic!(
19327                "buffer is too small (need {} bytes, but got {})",
19328                Self::ENCODED_LEN,
19329                __tmp.remaining(),
19330            )
19331        }
19332        __tmp.put_u32_le(self.id);
19333        __tmp.put_f32_le(self.time_to_minimum_delta);
19334        __tmp.put_f32_le(self.altitude_minimum_delta);
19335        __tmp.put_f32_le(self.horizontal_minimum_delta);
19336        __tmp.put_u8(self.src as u8);
19337        __tmp.put_u8(self.action as u8);
19338        __tmp.put_u8(self.threat_level as u8);
19339        if matches!(version, MavlinkVersion::V2) {
19340            let len = __tmp.len();
19341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19342        } else {
19343            __tmp.len()
19344        }
19345    }
19346}
19347#[doc = "id: 101"]
19348#[doc = "Global position/attitude estimate from a vision source."]
19349#[derive(Debug, Clone, PartialEq)]
19350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19352pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19353    #[doc = "Timestamp (UNIX time or since system boot)"]
19354    pub usec: u64,
19355    #[doc = "Global X position"]
19356    pub x: f32,
19357    #[doc = "Global Y position"]
19358    pub y: f32,
19359    #[doc = "Global Z position"]
19360    pub z: f32,
19361    #[doc = "Roll angle"]
19362    pub roll: f32,
19363    #[doc = "Pitch angle"]
19364    pub pitch: f32,
19365    #[doc = "Yaw angle"]
19366    pub yaw: f32,
19367    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
19368    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19370    pub covariance: [f32; 21],
19371    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
19372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19373    pub reset_counter: u8,
19374}
19375impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19376    pub const ENCODED_LEN: usize = 117usize;
19377    pub const DEFAULT: Self = Self {
19378        usec: 0_u64,
19379        x: 0.0_f32,
19380        y: 0.0_f32,
19381        z: 0.0_f32,
19382        roll: 0.0_f32,
19383        pitch: 0.0_f32,
19384        yaw: 0.0_f32,
19385        covariance: [0.0_f32; 21usize],
19386        reset_counter: 0_u8,
19387    };
19388    #[cfg(feature = "arbitrary")]
19389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19390        use arbitrary::{Arbitrary, Unstructured};
19391        let mut buf = [0u8; 1024];
19392        rng.fill_bytes(&mut buf);
19393        let mut unstructured = Unstructured::new(&buf);
19394        Self::arbitrary(&mut unstructured).unwrap_or_default()
19395    }
19396}
19397impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19398    fn default() -> Self {
19399        Self::DEFAULT.clone()
19400    }
19401}
19402impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
19403    type Message = MavMessage;
19404    const ID: u32 = 101u32;
19405    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
19406    const EXTRA_CRC: u8 = 102u8;
19407    const ENCODED_LEN: usize = 117usize;
19408    fn deser(
19409        _version: MavlinkVersion,
19410        __input: &[u8],
19411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19412        let avail_len = __input.len();
19413        let mut payload_buf = [0; Self::ENCODED_LEN];
19414        let mut buf = if avail_len < Self::ENCODED_LEN {
19415            payload_buf[0..avail_len].copy_from_slice(__input);
19416            Bytes::new(&payload_buf)
19417        } else {
19418            Bytes::new(__input)
19419        };
19420        let mut __struct = Self::default();
19421        __struct.usec = buf.get_u64_le();
19422        __struct.x = buf.get_f32_le();
19423        __struct.y = buf.get_f32_le();
19424        __struct.z = buf.get_f32_le();
19425        __struct.roll = buf.get_f32_le();
19426        __struct.pitch = buf.get_f32_le();
19427        __struct.yaw = buf.get_f32_le();
19428        for v in &mut __struct.covariance {
19429            let val = buf.get_f32_le();
19430            *v = val;
19431        }
19432        __struct.reset_counter = buf.get_u8();
19433        Ok(__struct)
19434    }
19435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19436        let mut __tmp = BytesMut::new(bytes);
19437        #[allow(clippy::absurd_extreme_comparisons)]
19438        #[allow(unused_comparisons)]
19439        if __tmp.remaining() < Self::ENCODED_LEN {
19440            panic!(
19441                "buffer is too small (need {} bytes, but got {})",
19442                Self::ENCODED_LEN,
19443                __tmp.remaining(),
19444            )
19445        }
19446        __tmp.put_u64_le(self.usec);
19447        __tmp.put_f32_le(self.x);
19448        __tmp.put_f32_le(self.y);
19449        __tmp.put_f32_le(self.z);
19450        __tmp.put_f32_le(self.roll);
19451        __tmp.put_f32_le(self.pitch);
19452        __tmp.put_f32_le(self.yaw);
19453        for val in &self.covariance {
19454            __tmp.put_f32_le(*val);
19455        }
19456        __tmp.put_u8(self.reset_counter);
19457        if matches!(version, MavlinkVersion::V2) {
19458            let len = __tmp.len();
19459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19460        } else {
19461            __tmp.len()
19462        }
19463    }
19464}
19465#[doc = "id: 410"]
19466#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
19467#[derive(Debug, Clone, PartialEq)]
19468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19470pub struct EVENT_DATA {
19471    #[doc = "Event ID (as defined in the component metadata)"]
19472    pub id: u32,
19473    #[doc = "Timestamp (time since system boot when the event happened)."]
19474    pub event_time_boot_ms: u32,
19475    #[doc = "Sequence number."]
19476    pub sequence: u16,
19477    #[doc = "Component ID"]
19478    pub destination_component: u8,
19479    #[doc = "System ID"]
19480    pub destination_system: u8,
19481    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
19482    pub log_levels: u8,
19483    #[doc = "Arguments (depend on event ID)."]
19484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19485    pub arguments: [u8; 40],
19486}
19487impl EVENT_DATA {
19488    pub const ENCODED_LEN: usize = 53usize;
19489    pub const DEFAULT: Self = Self {
19490        id: 0_u32,
19491        event_time_boot_ms: 0_u32,
19492        sequence: 0_u16,
19493        destination_component: 0_u8,
19494        destination_system: 0_u8,
19495        log_levels: 0_u8,
19496        arguments: [0_u8; 40usize],
19497    };
19498    #[cfg(feature = "arbitrary")]
19499    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19500        use arbitrary::{Arbitrary, Unstructured};
19501        let mut buf = [0u8; 1024];
19502        rng.fill_bytes(&mut buf);
19503        let mut unstructured = Unstructured::new(&buf);
19504        Self::arbitrary(&mut unstructured).unwrap_or_default()
19505    }
19506}
19507impl Default for EVENT_DATA {
19508    fn default() -> Self {
19509        Self::DEFAULT.clone()
19510    }
19511}
19512impl MessageData for EVENT_DATA {
19513    type Message = MavMessage;
19514    const ID: u32 = 410u32;
19515    const NAME: &'static str = "EVENT";
19516    const EXTRA_CRC: u8 = 160u8;
19517    const ENCODED_LEN: usize = 53usize;
19518    fn deser(
19519        _version: MavlinkVersion,
19520        __input: &[u8],
19521    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19522        let avail_len = __input.len();
19523        let mut payload_buf = [0; Self::ENCODED_LEN];
19524        let mut buf = if avail_len < Self::ENCODED_LEN {
19525            payload_buf[0..avail_len].copy_from_slice(__input);
19526            Bytes::new(&payload_buf)
19527        } else {
19528            Bytes::new(__input)
19529        };
19530        let mut __struct = Self::default();
19531        __struct.id = buf.get_u32_le();
19532        __struct.event_time_boot_ms = buf.get_u32_le();
19533        __struct.sequence = buf.get_u16_le();
19534        __struct.destination_component = buf.get_u8();
19535        __struct.destination_system = buf.get_u8();
19536        __struct.log_levels = buf.get_u8();
19537        for v in &mut __struct.arguments {
19538            let val = buf.get_u8();
19539            *v = val;
19540        }
19541        Ok(__struct)
19542    }
19543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19544        let mut __tmp = BytesMut::new(bytes);
19545        #[allow(clippy::absurd_extreme_comparisons)]
19546        #[allow(unused_comparisons)]
19547        if __tmp.remaining() < Self::ENCODED_LEN {
19548            panic!(
19549                "buffer is too small (need {} bytes, but got {})",
19550                Self::ENCODED_LEN,
19551                __tmp.remaining(),
19552            )
19553        }
19554        __tmp.put_u32_le(self.id);
19555        __tmp.put_u32_le(self.event_time_boot_ms);
19556        __tmp.put_u16_le(self.sequence);
19557        __tmp.put_u8(self.destination_component);
19558        __tmp.put_u8(self.destination_system);
19559        __tmp.put_u8(self.log_levels);
19560        for val in &self.arguments {
19561            __tmp.put_u8(*val);
19562        }
19563        if matches!(version, MavlinkVersion::V2) {
19564            let len = __tmp.len();
19565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19566        } else {
19567            __tmp.len()
19568        }
19569    }
19570}
19571#[doc = "id: 9000"]
19572#[doc = "Cumulative distance traveled for each reported wheel."]
19573#[derive(Debug, Clone, PartialEq)]
19574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19576pub struct WHEEL_DISTANCE_DATA {
19577    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
19578    pub time_usec: u64,
19579    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
19580    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19581    pub distance: [f64; 16],
19582    #[doc = "Number of wheels reported."]
19583    pub count: u8,
19584}
19585impl WHEEL_DISTANCE_DATA {
19586    pub const ENCODED_LEN: usize = 137usize;
19587    pub const DEFAULT: Self = Self {
19588        time_usec: 0_u64,
19589        distance: [0.0_f64; 16usize],
19590        count: 0_u8,
19591    };
19592    #[cfg(feature = "arbitrary")]
19593    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19594        use arbitrary::{Arbitrary, Unstructured};
19595        let mut buf = [0u8; 1024];
19596        rng.fill_bytes(&mut buf);
19597        let mut unstructured = Unstructured::new(&buf);
19598        Self::arbitrary(&mut unstructured).unwrap_or_default()
19599    }
19600}
19601impl Default for WHEEL_DISTANCE_DATA {
19602    fn default() -> Self {
19603        Self::DEFAULT.clone()
19604    }
19605}
19606impl MessageData for WHEEL_DISTANCE_DATA {
19607    type Message = MavMessage;
19608    const ID: u32 = 9000u32;
19609    const NAME: &'static str = "WHEEL_DISTANCE";
19610    const EXTRA_CRC: u8 = 113u8;
19611    const ENCODED_LEN: usize = 137usize;
19612    fn deser(
19613        _version: MavlinkVersion,
19614        __input: &[u8],
19615    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19616        let avail_len = __input.len();
19617        let mut payload_buf = [0; Self::ENCODED_LEN];
19618        let mut buf = if avail_len < Self::ENCODED_LEN {
19619            payload_buf[0..avail_len].copy_from_slice(__input);
19620            Bytes::new(&payload_buf)
19621        } else {
19622            Bytes::new(__input)
19623        };
19624        let mut __struct = Self::default();
19625        __struct.time_usec = buf.get_u64_le();
19626        for v in &mut __struct.distance {
19627            let val = buf.get_f64_le();
19628            *v = val;
19629        }
19630        __struct.count = buf.get_u8();
19631        Ok(__struct)
19632    }
19633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19634        let mut __tmp = BytesMut::new(bytes);
19635        #[allow(clippy::absurd_extreme_comparisons)]
19636        #[allow(unused_comparisons)]
19637        if __tmp.remaining() < Self::ENCODED_LEN {
19638            panic!(
19639                "buffer is too small (need {} bytes, but got {})",
19640                Self::ENCODED_LEN,
19641                __tmp.remaining(),
19642            )
19643        }
19644        __tmp.put_u64_le(self.time_usec);
19645        for val in &self.distance {
19646            __tmp.put_f64_le(*val);
19647        }
19648        __tmp.put_u8(self.count);
19649        if matches!(version, MavlinkVersion::V2) {
19650            let len = __tmp.len();
19651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19652        } else {
19653            __tmp.len()
19654        }
19655    }
19656}
19657#[doc = "id: 121"]
19658#[doc = "Erase all logs."]
19659#[derive(Debug, Clone, PartialEq)]
19660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19662pub struct LOG_ERASE_DATA {
19663    #[doc = "System ID"]
19664    pub target_system: u8,
19665    #[doc = "Component ID"]
19666    pub target_component: u8,
19667}
19668impl LOG_ERASE_DATA {
19669    pub const ENCODED_LEN: usize = 2usize;
19670    pub const DEFAULT: Self = Self {
19671        target_system: 0_u8,
19672        target_component: 0_u8,
19673    };
19674    #[cfg(feature = "arbitrary")]
19675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19676        use arbitrary::{Arbitrary, Unstructured};
19677        let mut buf = [0u8; 1024];
19678        rng.fill_bytes(&mut buf);
19679        let mut unstructured = Unstructured::new(&buf);
19680        Self::arbitrary(&mut unstructured).unwrap_or_default()
19681    }
19682}
19683impl Default for LOG_ERASE_DATA {
19684    fn default() -> Self {
19685        Self::DEFAULT.clone()
19686    }
19687}
19688impl MessageData for LOG_ERASE_DATA {
19689    type Message = MavMessage;
19690    const ID: u32 = 121u32;
19691    const NAME: &'static str = "LOG_ERASE";
19692    const EXTRA_CRC: u8 = 237u8;
19693    const ENCODED_LEN: usize = 2usize;
19694    fn deser(
19695        _version: MavlinkVersion,
19696        __input: &[u8],
19697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19698        let avail_len = __input.len();
19699        let mut payload_buf = [0; Self::ENCODED_LEN];
19700        let mut buf = if avail_len < Self::ENCODED_LEN {
19701            payload_buf[0..avail_len].copy_from_slice(__input);
19702            Bytes::new(&payload_buf)
19703        } else {
19704            Bytes::new(__input)
19705        };
19706        let mut __struct = Self::default();
19707        __struct.target_system = buf.get_u8();
19708        __struct.target_component = buf.get_u8();
19709        Ok(__struct)
19710    }
19711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19712        let mut __tmp = BytesMut::new(bytes);
19713        #[allow(clippy::absurd_extreme_comparisons)]
19714        #[allow(unused_comparisons)]
19715        if __tmp.remaining() < Self::ENCODED_LEN {
19716            panic!(
19717                "buffer is too small (need {} bytes, but got {})",
19718                Self::ENCODED_LEN,
19719                __tmp.remaining(),
19720            )
19721        }
19722        __tmp.put_u8(self.target_system);
19723        __tmp.put_u8(self.target_component);
19724        if matches!(version, MavlinkVersion::V2) {
19725            let len = __tmp.len();
19726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19727        } else {
19728            __tmp.len()
19729        }
19730    }
19731}
19732#[doc = "id: 256"]
19733#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
19734#[derive(Debug, Clone, PartialEq)]
19735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19737pub struct SETUP_SIGNING_DATA {
19738    #[doc = "initial timestamp"]
19739    pub initial_timestamp: u64,
19740    #[doc = "system id of the target"]
19741    pub target_system: u8,
19742    #[doc = "component ID of the target"]
19743    pub target_component: u8,
19744    #[doc = "signing key"]
19745    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19746    pub secret_key: [u8; 32],
19747}
19748impl SETUP_SIGNING_DATA {
19749    pub const ENCODED_LEN: usize = 42usize;
19750    pub const DEFAULT: Self = Self {
19751        initial_timestamp: 0_u64,
19752        target_system: 0_u8,
19753        target_component: 0_u8,
19754        secret_key: [0_u8; 32usize],
19755    };
19756    #[cfg(feature = "arbitrary")]
19757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19758        use arbitrary::{Arbitrary, Unstructured};
19759        let mut buf = [0u8; 1024];
19760        rng.fill_bytes(&mut buf);
19761        let mut unstructured = Unstructured::new(&buf);
19762        Self::arbitrary(&mut unstructured).unwrap_or_default()
19763    }
19764}
19765impl Default for SETUP_SIGNING_DATA {
19766    fn default() -> Self {
19767        Self::DEFAULT.clone()
19768    }
19769}
19770impl MessageData for SETUP_SIGNING_DATA {
19771    type Message = MavMessage;
19772    const ID: u32 = 256u32;
19773    const NAME: &'static str = "SETUP_SIGNING";
19774    const EXTRA_CRC: u8 = 71u8;
19775    const ENCODED_LEN: usize = 42usize;
19776    fn deser(
19777        _version: MavlinkVersion,
19778        __input: &[u8],
19779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19780        let avail_len = __input.len();
19781        let mut payload_buf = [0; Self::ENCODED_LEN];
19782        let mut buf = if avail_len < Self::ENCODED_LEN {
19783            payload_buf[0..avail_len].copy_from_slice(__input);
19784            Bytes::new(&payload_buf)
19785        } else {
19786            Bytes::new(__input)
19787        };
19788        let mut __struct = Self::default();
19789        __struct.initial_timestamp = buf.get_u64_le();
19790        __struct.target_system = buf.get_u8();
19791        __struct.target_component = buf.get_u8();
19792        for v in &mut __struct.secret_key {
19793            let val = buf.get_u8();
19794            *v = val;
19795        }
19796        Ok(__struct)
19797    }
19798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19799        let mut __tmp = BytesMut::new(bytes);
19800        #[allow(clippy::absurd_extreme_comparisons)]
19801        #[allow(unused_comparisons)]
19802        if __tmp.remaining() < Self::ENCODED_LEN {
19803            panic!(
19804                "buffer is too small (need {} bytes, but got {})",
19805                Self::ENCODED_LEN,
19806                __tmp.remaining(),
19807            )
19808        }
19809        __tmp.put_u64_le(self.initial_timestamp);
19810        __tmp.put_u8(self.target_system);
19811        __tmp.put_u8(self.target_component);
19812        for val in &self.secret_key {
19813            __tmp.put_u8(*val);
19814        }
19815        if matches!(version, MavlinkVersion::V2) {
19816            let len = __tmp.len();
19817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19818        } else {
19819            __tmp.len()
19820        }
19821    }
19822}
19823#[doc = "id: 254"]
19824#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
19825#[derive(Debug, Clone, PartialEq)]
19826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19828pub struct DEBUG_DATA {
19829    #[doc = "Timestamp (time since system boot)."]
19830    pub time_boot_ms: u32,
19831    #[doc = "DEBUG value"]
19832    pub value: f32,
19833    #[doc = "index of debug variable"]
19834    pub ind: u8,
19835}
19836impl DEBUG_DATA {
19837    pub const ENCODED_LEN: usize = 9usize;
19838    pub const DEFAULT: Self = Self {
19839        time_boot_ms: 0_u32,
19840        value: 0.0_f32,
19841        ind: 0_u8,
19842    };
19843    #[cfg(feature = "arbitrary")]
19844    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19845        use arbitrary::{Arbitrary, Unstructured};
19846        let mut buf = [0u8; 1024];
19847        rng.fill_bytes(&mut buf);
19848        let mut unstructured = Unstructured::new(&buf);
19849        Self::arbitrary(&mut unstructured).unwrap_or_default()
19850    }
19851}
19852impl Default for DEBUG_DATA {
19853    fn default() -> Self {
19854        Self::DEFAULT.clone()
19855    }
19856}
19857impl MessageData for DEBUG_DATA {
19858    type Message = MavMessage;
19859    const ID: u32 = 254u32;
19860    const NAME: &'static str = "DEBUG";
19861    const EXTRA_CRC: u8 = 46u8;
19862    const ENCODED_LEN: usize = 9usize;
19863    fn deser(
19864        _version: MavlinkVersion,
19865        __input: &[u8],
19866    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19867        let avail_len = __input.len();
19868        let mut payload_buf = [0; Self::ENCODED_LEN];
19869        let mut buf = if avail_len < Self::ENCODED_LEN {
19870            payload_buf[0..avail_len].copy_from_slice(__input);
19871            Bytes::new(&payload_buf)
19872        } else {
19873            Bytes::new(__input)
19874        };
19875        let mut __struct = Self::default();
19876        __struct.time_boot_ms = buf.get_u32_le();
19877        __struct.value = buf.get_f32_le();
19878        __struct.ind = buf.get_u8();
19879        Ok(__struct)
19880    }
19881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19882        let mut __tmp = BytesMut::new(bytes);
19883        #[allow(clippy::absurd_extreme_comparisons)]
19884        #[allow(unused_comparisons)]
19885        if __tmp.remaining() < Self::ENCODED_LEN {
19886            panic!(
19887                "buffer is too small (need {} bytes, but got {})",
19888                Self::ENCODED_LEN,
19889                __tmp.remaining(),
19890            )
19891        }
19892        __tmp.put_u32_le(self.time_boot_ms);
19893        __tmp.put_f32_le(self.value);
19894        __tmp.put_u8(self.ind);
19895        if matches!(version, MavlinkVersion::V2) {
19896            let len = __tmp.len();
19897            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19898        } else {
19899            __tmp.len()
19900        }
19901    }
19902}
19903#[doc = "id: 11"]
19904#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
19905#[derive(Debug, Clone, PartialEq)]
19906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19908pub struct SET_MODE_DATA {
19909    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
19910    pub custom_mode: u32,
19911    #[doc = "The system setting the mode"]
19912    pub target_system: u8,
19913    #[doc = "The new base mode."]
19914    pub base_mode: MavMode,
19915}
19916impl SET_MODE_DATA {
19917    pub const ENCODED_LEN: usize = 6usize;
19918    pub const DEFAULT: Self = Self {
19919        custom_mode: 0_u32,
19920        target_system: 0_u8,
19921        base_mode: MavMode::DEFAULT,
19922    };
19923    #[cfg(feature = "arbitrary")]
19924    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19925        use arbitrary::{Arbitrary, Unstructured};
19926        let mut buf = [0u8; 1024];
19927        rng.fill_bytes(&mut buf);
19928        let mut unstructured = Unstructured::new(&buf);
19929        Self::arbitrary(&mut unstructured).unwrap_or_default()
19930    }
19931}
19932impl Default for SET_MODE_DATA {
19933    fn default() -> Self {
19934        Self::DEFAULT.clone()
19935    }
19936}
19937impl MessageData for SET_MODE_DATA {
19938    type Message = MavMessage;
19939    const ID: u32 = 11u32;
19940    const NAME: &'static str = "SET_MODE";
19941    const EXTRA_CRC: u8 = 89u8;
19942    const ENCODED_LEN: usize = 6usize;
19943    fn deser(
19944        _version: MavlinkVersion,
19945        __input: &[u8],
19946    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19947        let avail_len = __input.len();
19948        let mut payload_buf = [0; Self::ENCODED_LEN];
19949        let mut buf = if avail_len < Self::ENCODED_LEN {
19950            payload_buf[0..avail_len].copy_from_slice(__input);
19951            Bytes::new(&payload_buf)
19952        } else {
19953            Bytes::new(__input)
19954        };
19955        let mut __struct = Self::default();
19956        __struct.custom_mode = buf.get_u32_le();
19957        __struct.target_system = buf.get_u8();
19958        let tmp = buf.get_u8();
19959        __struct.base_mode =
19960            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19961                enum_type: "MavMode",
19962                value: tmp as u32,
19963            })?;
19964        Ok(__struct)
19965    }
19966    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19967        let mut __tmp = BytesMut::new(bytes);
19968        #[allow(clippy::absurd_extreme_comparisons)]
19969        #[allow(unused_comparisons)]
19970        if __tmp.remaining() < Self::ENCODED_LEN {
19971            panic!(
19972                "buffer is too small (need {} bytes, but got {})",
19973                Self::ENCODED_LEN,
19974                __tmp.remaining(),
19975            )
19976        }
19977        __tmp.put_u32_le(self.custom_mode);
19978        __tmp.put_u8(self.target_system);
19979        __tmp.put_u8(self.base_mode as u8);
19980        if matches!(version, MavlinkVersion::V2) {
19981            let len = __tmp.len();
19982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19983        } else {
19984            __tmp.len()
19985        }
19986    }
19987}
19988#[doc = "id: 0"]
19989#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
19990#[derive(Debug, Clone, PartialEq)]
19991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19993pub struct HEARTBEAT_DATA {
19994    #[doc = "A bitfield for use for autopilot-specific flags"]
19995    pub custom_mode: u32,
19996    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
19997    pub mavtype: MavType,
19998    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
19999    pub autopilot: MavAutopilot,
20000    #[doc = "System mode bitmap."]
20001    pub base_mode: MavModeFlag,
20002    #[doc = "System status flag."]
20003    pub system_status: MavState,
20004    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
20005    pub mavlink_version: u8,
20006}
20007impl HEARTBEAT_DATA {
20008    pub const ENCODED_LEN: usize = 9usize;
20009    pub const DEFAULT: Self = Self {
20010        custom_mode: 0_u32,
20011        mavtype: MavType::DEFAULT,
20012        autopilot: MavAutopilot::DEFAULT,
20013        base_mode: MavModeFlag::DEFAULT,
20014        system_status: MavState::DEFAULT,
20015        mavlink_version: 0_u8,
20016    };
20017    #[cfg(feature = "arbitrary")]
20018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20019        use arbitrary::{Arbitrary, Unstructured};
20020        let mut buf = [0u8; 1024];
20021        rng.fill_bytes(&mut buf);
20022        let mut unstructured = Unstructured::new(&buf);
20023        Self::arbitrary(&mut unstructured).unwrap_or_default()
20024    }
20025}
20026impl Default for HEARTBEAT_DATA {
20027    fn default() -> Self {
20028        Self::DEFAULT.clone()
20029    }
20030}
20031impl MessageData for HEARTBEAT_DATA {
20032    type Message = MavMessage;
20033    const ID: u32 = 0u32;
20034    const NAME: &'static str = "HEARTBEAT";
20035    const EXTRA_CRC: u8 = 50u8;
20036    const ENCODED_LEN: usize = 9usize;
20037    fn deser(
20038        _version: MavlinkVersion,
20039        __input: &[u8],
20040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20041        let avail_len = __input.len();
20042        let mut payload_buf = [0; Self::ENCODED_LEN];
20043        let mut buf = if avail_len < Self::ENCODED_LEN {
20044            payload_buf[0..avail_len].copy_from_slice(__input);
20045            Bytes::new(&payload_buf)
20046        } else {
20047            Bytes::new(__input)
20048        };
20049        let mut __struct = Self::default();
20050        __struct.custom_mode = buf.get_u32_le();
20051        let tmp = buf.get_u8();
20052        __struct.mavtype =
20053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20054                enum_type: "MavType",
20055                value: tmp as u32,
20056            })?;
20057        let tmp = buf.get_u8();
20058        __struct.autopilot =
20059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20060                enum_type: "MavAutopilot",
20061                value: tmp as u32,
20062            })?;
20063        let tmp = buf.get_u8();
20064        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
20065            ::mavlink_core::error::ParserError::InvalidFlag {
20066                flag_type: "MavModeFlag",
20067                value: tmp as u32,
20068            },
20069        )?;
20070        let tmp = buf.get_u8();
20071        __struct.system_status =
20072            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20073                enum_type: "MavState",
20074                value: tmp as u32,
20075            })?;
20076        __struct.mavlink_version = buf.get_u8();
20077        Ok(__struct)
20078    }
20079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20080        let mut __tmp = BytesMut::new(bytes);
20081        #[allow(clippy::absurd_extreme_comparisons)]
20082        #[allow(unused_comparisons)]
20083        if __tmp.remaining() < Self::ENCODED_LEN {
20084            panic!(
20085                "buffer is too small (need {} bytes, but got {})",
20086                Self::ENCODED_LEN,
20087                __tmp.remaining(),
20088            )
20089        }
20090        __tmp.put_u32_le(self.custom_mode);
20091        __tmp.put_u8(self.mavtype as u8);
20092        __tmp.put_u8(self.autopilot as u8);
20093        __tmp.put_u8(self.base_mode.bits());
20094        __tmp.put_u8(self.system_status as u8);
20095        __tmp.put_u8(self.mavlink_version);
20096        if matches!(version, MavlinkVersion::V2) {
20097            let len = __tmp.len();
20098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20099        } else {
20100            __tmp.len()
20101        }
20102    }
20103}
20104#[doc = "id: 115"]
20105#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
20106#[derive(Debug, Clone, PartialEq)]
20107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20109pub struct HIL_STATE_QUATERNION_DATA {
20110    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20111    pub time_usec: u64,
20112    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
20113    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20114    pub attitude_quaternion: [f32; 4],
20115    #[doc = "Body frame roll / phi angular speed"]
20116    pub rollspeed: f32,
20117    #[doc = "Body frame pitch / theta angular speed"]
20118    pub pitchspeed: f32,
20119    #[doc = "Body frame yaw / psi angular speed"]
20120    pub yawspeed: f32,
20121    #[doc = "Latitude"]
20122    pub lat: i32,
20123    #[doc = "Longitude"]
20124    pub lon: i32,
20125    #[doc = "Altitude"]
20126    pub alt: i32,
20127    #[doc = "Ground X Speed (Latitude)"]
20128    pub vx: i16,
20129    #[doc = "Ground Y Speed (Longitude)"]
20130    pub vy: i16,
20131    #[doc = "Ground Z Speed (Altitude)"]
20132    pub vz: i16,
20133    #[doc = "Indicated airspeed"]
20134    pub ind_airspeed: u16,
20135    #[doc = "True airspeed"]
20136    pub true_airspeed: u16,
20137    #[doc = "X acceleration"]
20138    pub xacc: i16,
20139    #[doc = "Y acceleration"]
20140    pub yacc: i16,
20141    #[doc = "Z acceleration"]
20142    pub zacc: i16,
20143}
20144impl HIL_STATE_QUATERNION_DATA {
20145    pub const ENCODED_LEN: usize = 64usize;
20146    pub const DEFAULT: Self = Self {
20147        time_usec: 0_u64,
20148        attitude_quaternion: [0.0_f32; 4usize],
20149        rollspeed: 0.0_f32,
20150        pitchspeed: 0.0_f32,
20151        yawspeed: 0.0_f32,
20152        lat: 0_i32,
20153        lon: 0_i32,
20154        alt: 0_i32,
20155        vx: 0_i16,
20156        vy: 0_i16,
20157        vz: 0_i16,
20158        ind_airspeed: 0_u16,
20159        true_airspeed: 0_u16,
20160        xacc: 0_i16,
20161        yacc: 0_i16,
20162        zacc: 0_i16,
20163    };
20164    #[cfg(feature = "arbitrary")]
20165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20166        use arbitrary::{Arbitrary, Unstructured};
20167        let mut buf = [0u8; 1024];
20168        rng.fill_bytes(&mut buf);
20169        let mut unstructured = Unstructured::new(&buf);
20170        Self::arbitrary(&mut unstructured).unwrap_or_default()
20171    }
20172}
20173impl Default for HIL_STATE_QUATERNION_DATA {
20174    fn default() -> Self {
20175        Self::DEFAULT.clone()
20176    }
20177}
20178impl MessageData for HIL_STATE_QUATERNION_DATA {
20179    type Message = MavMessage;
20180    const ID: u32 = 115u32;
20181    const NAME: &'static str = "HIL_STATE_QUATERNION";
20182    const EXTRA_CRC: u8 = 4u8;
20183    const ENCODED_LEN: usize = 64usize;
20184    fn deser(
20185        _version: MavlinkVersion,
20186        __input: &[u8],
20187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20188        let avail_len = __input.len();
20189        let mut payload_buf = [0; Self::ENCODED_LEN];
20190        let mut buf = if avail_len < Self::ENCODED_LEN {
20191            payload_buf[0..avail_len].copy_from_slice(__input);
20192            Bytes::new(&payload_buf)
20193        } else {
20194            Bytes::new(__input)
20195        };
20196        let mut __struct = Self::default();
20197        __struct.time_usec = buf.get_u64_le();
20198        for v in &mut __struct.attitude_quaternion {
20199            let val = buf.get_f32_le();
20200            *v = val;
20201        }
20202        __struct.rollspeed = buf.get_f32_le();
20203        __struct.pitchspeed = buf.get_f32_le();
20204        __struct.yawspeed = buf.get_f32_le();
20205        __struct.lat = buf.get_i32_le();
20206        __struct.lon = buf.get_i32_le();
20207        __struct.alt = buf.get_i32_le();
20208        __struct.vx = buf.get_i16_le();
20209        __struct.vy = buf.get_i16_le();
20210        __struct.vz = buf.get_i16_le();
20211        __struct.ind_airspeed = buf.get_u16_le();
20212        __struct.true_airspeed = buf.get_u16_le();
20213        __struct.xacc = buf.get_i16_le();
20214        __struct.yacc = buf.get_i16_le();
20215        __struct.zacc = buf.get_i16_le();
20216        Ok(__struct)
20217    }
20218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20219        let mut __tmp = BytesMut::new(bytes);
20220        #[allow(clippy::absurd_extreme_comparisons)]
20221        #[allow(unused_comparisons)]
20222        if __tmp.remaining() < Self::ENCODED_LEN {
20223            panic!(
20224                "buffer is too small (need {} bytes, but got {})",
20225                Self::ENCODED_LEN,
20226                __tmp.remaining(),
20227            )
20228        }
20229        __tmp.put_u64_le(self.time_usec);
20230        for val in &self.attitude_quaternion {
20231            __tmp.put_f32_le(*val);
20232        }
20233        __tmp.put_f32_le(self.rollspeed);
20234        __tmp.put_f32_le(self.pitchspeed);
20235        __tmp.put_f32_le(self.yawspeed);
20236        __tmp.put_i32_le(self.lat);
20237        __tmp.put_i32_le(self.lon);
20238        __tmp.put_i32_le(self.alt);
20239        __tmp.put_i16_le(self.vx);
20240        __tmp.put_i16_le(self.vy);
20241        __tmp.put_i16_le(self.vz);
20242        __tmp.put_u16_le(self.ind_airspeed);
20243        __tmp.put_u16_le(self.true_airspeed);
20244        __tmp.put_i16_le(self.xacc);
20245        __tmp.put_i16_le(self.yacc);
20246        __tmp.put_i16_le(self.zacc);
20247        if matches!(version, MavlinkVersion::V2) {
20248            let len = __tmp.len();
20249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20250        } else {
20251            __tmp.len()
20252        }
20253    }
20254}
20255#[doc = "id: 51"]
20256#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20257#[derive(Debug, Clone, PartialEq)]
20258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20260pub struct MISSION_REQUEST_INT_DATA {
20261    #[doc = "Sequence"]
20262    pub seq: u16,
20263    #[doc = "System ID"]
20264    pub target_system: u8,
20265    #[doc = "Component ID"]
20266    pub target_component: u8,
20267    #[doc = "Mission type."]
20268    #[cfg_attr(feature = "serde", serde(default))]
20269    pub mission_type: MavMissionType,
20270}
20271impl MISSION_REQUEST_INT_DATA {
20272    pub const ENCODED_LEN: usize = 5usize;
20273    pub const DEFAULT: Self = Self {
20274        seq: 0_u16,
20275        target_system: 0_u8,
20276        target_component: 0_u8,
20277        mission_type: MavMissionType::DEFAULT,
20278    };
20279    #[cfg(feature = "arbitrary")]
20280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20281        use arbitrary::{Arbitrary, Unstructured};
20282        let mut buf = [0u8; 1024];
20283        rng.fill_bytes(&mut buf);
20284        let mut unstructured = Unstructured::new(&buf);
20285        Self::arbitrary(&mut unstructured).unwrap_or_default()
20286    }
20287}
20288impl Default for MISSION_REQUEST_INT_DATA {
20289    fn default() -> Self {
20290        Self::DEFAULT.clone()
20291    }
20292}
20293impl MessageData for MISSION_REQUEST_INT_DATA {
20294    type Message = MavMessage;
20295    const ID: u32 = 51u32;
20296    const NAME: &'static str = "MISSION_REQUEST_INT";
20297    const EXTRA_CRC: u8 = 196u8;
20298    const ENCODED_LEN: usize = 5usize;
20299    fn deser(
20300        _version: MavlinkVersion,
20301        __input: &[u8],
20302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20303        let avail_len = __input.len();
20304        let mut payload_buf = [0; Self::ENCODED_LEN];
20305        let mut buf = if avail_len < Self::ENCODED_LEN {
20306            payload_buf[0..avail_len].copy_from_slice(__input);
20307            Bytes::new(&payload_buf)
20308        } else {
20309            Bytes::new(__input)
20310        };
20311        let mut __struct = Self::default();
20312        __struct.seq = buf.get_u16_le();
20313        __struct.target_system = buf.get_u8();
20314        __struct.target_component = buf.get_u8();
20315        let tmp = buf.get_u8();
20316        __struct.mission_type =
20317            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20318                enum_type: "MavMissionType",
20319                value: tmp as u32,
20320            })?;
20321        Ok(__struct)
20322    }
20323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20324        let mut __tmp = BytesMut::new(bytes);
20325        #[allow(clippy::absurd_extreme_comparisons)]
20326        #[allow(unused_comparisons)]
20327        if __tmp.remaining() < Self::ENCODED_LEN {
20328            panic!(
20329                "buffer is too small (need {} bytes, but got {})",
20330                Self::ENCODED_LEN,
20331                __tmp.remaining(),
20332            )
20333        }
20334        __tmp.put_u16_le(self.seq);
20335        __tmp.put_u8(self.target_system);
20336        __tmp.put_u8(self.target_component);
20337        __tmp.put_u8(self.mission_type as u8);
20338        if matches!(version, MavlinkVersion::V2) {
20339            let len = __tmp.len();
20340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20341        } else {
20342            __tmp.len()
20343        }
20344    }
20345}
20346#[doc = "id: 245"]
20347#[doc = "Provides state for additional features."]
20348#[derive(Debug, Clone, PartialEq)]
20349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20351pub struct EXTENDED_SYS_STATE_DATA {
20352    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
20353    pub vtol_state: MavVtolState,
20354    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
20355    pub landed_state: MavLandedState,
20356}
20357impl EXTENDED_SYS_STATE_DATA {
20358    pub const ENCODED_LEN: usize = 2usize;
20359    pub const DEFAULT: Self = Self {
20360        vtol_state: MavVtolState::DEFAULT,
20361        landed_state: MavLandedState::DEFAULT,
20362    };
20363    #[cfg(feature = "arbitrary")]
20364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20365        use arbitrary::{Arbitrary, Unstructured};
20366        let mut buf = [0u8; 1024];
20367        rng.fill_bytes(&mut buf);
20368        let mut unstructured = Unstructured::new(&buf);
20369        Self::arbitrary(&mut unstructured).unwrap_or_default()
20370    }
20371}
20372impl Default for EXTENDED_SYS_STATE_DATA {
20373    fn default() -> Self {
20374        Self::DEFAULT.clone()
20375    }
20376}
20377impl MessageData for EXTENDED_SYS_STATE_DATA {
20378    type Message = MavMessage;
20379    const ID: u32 = 245u32;
20380    const NAME: &'static str = "EXTENDED_SYS_STATE";
20381    const EXTRA_CRC: u8 = 130u8;
20382    const ENCODED_LEN: usize = 2usize;
20383    fn deser(
20384        _version: MavlinkVersion,
20385        __input: &[u8],
20386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20387        let avail_len = __input.len();
20388        let mut payload_buf = [0; Self::ENCODED_LEN];
20389        let mut buf = if avail_len < Self::ENCODED_LEN {
20390            payload_buf[0..avail_len].copy_from_slice(__input);
20391            Bytes::new(&payload_buf)
20392        } else {
20393            Bytes::new(__input)
20394        };
20395        let mut __struct = Self::default();
20396        let tmp = buf.get_u8();
20397        __struct.vtol_state =
20398            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20399                enum_type: "MavVtolState",
20400                value: tmp as u32,
20401            })?;
20402        let tmp = buf.get_u8();
20403        __struct.landed_state =
20404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20405                enum_type: "MavLandedState",
20406                value: tmp as u32,
20407            })?;
20408        Ok(__struct)
20409    }
20410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20411        let mut __tmp = BytesMut::new(bytes);
20412        #[allow(clippy::absurd_extreme_comparisons)]
20413        #[allow(unused_comparisons)]
20414        if __tmp.remaining() < Self::ENCODED_LEN {
20415            panic!(
20416                "buffer is too small (need {} bytes, but got {})",
20417                Self::ENCODED_LEN,
20418                __tmp.remaining(),
20419            )
20420        }
20421        __tmp.put_u8(self.vtol_state as u8);
20422        __tmp.put_u8(self.landed_state as u8);
20423        if matches!(version, MavlinkVersion::V2) {
20424            let len = __tmp.len();
20425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20426        } else {
20427            __tmp.len()
20428        }
20429    }
20430}
20431#[doc = "id: 310"]
20432#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
20433#[derive(Debug, Clone, PartialEq)]
20434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20436pub struct UAVCAN_NODE_STATUS_DATA {
20437    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20438    pub time_usec: u64,
20439    #[doc = "Time since the start-up of the node."]
20440    pub uptime_sec: u32,
20441    #[doc = "Vendor-specific status information."]
20442    pub vendor_specific_status_code: u16,
20443    #[doc = "Generalized node health status."]
20444    pub health: UavcanNodeHealth,
20445    #[doc = "Generalized operating mode."]
20446    pub mode: UavcanNodeMode,
20447    #[doc = "Not used currently."]
20448    pub sub_mode: u8,
20449}
20450impl UAVCAN_NODE_STATUS_DATA {
20451    pub const ENCODED_LEN: usize = 17usize;
20452    pub const DEFAULT: Self = Self {
20453        time_usec: 0_u64,
20454        uptime_sec: 0_u32,
20455        vendor_specific_status_code: 0_u16,
20456        health: UavcanNodeHealth::DEFAULT,
20457        mode: UavcanNodeMode::DEFAULT,
20458        sub_mode: 0_u8,
20459    };
20460    #[cfg(feature = "arbitrary")]
20461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20462        use arbitrary::{Arbitrary, Unstructured};
20463        let mut buf = [0u8; 1024];
20464        rng.fill_bytes(&mut buf);
20465        let mut unstructured = Unstructured::new(&buf);
20466        Self::arbitrary(&mut unstructured).unwrap_or_default()
20467    }
20468}
20469impl Default for UAVCAN_NODE_STATUS_DATA {
20470    fn default() -> Self {
20471        Self::DEFAULT.clone()
20472    }
20473}
20474impl MessageData for UAVCAN_NODE_STATUS_DATA {
20475    type Message = MavMessage;
20476    const ID: u32 = 310u32;
20477    const NAME: &'static str = "UAVCAN_NODE_STATUS";
20478    const EXTRA_CRC: u8 = 28u8;
20479    const ENCODED_LEN: usize = 17usize;
20480    fn deser(
20481        _version: MavlinkVersion,
20482        __input: &[u8],
20483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20484        let avail_len = __input.len();
20485        let mut payload_buf = [0; Self::ENCODED_LEN];
20486        let mut buf = if avail_len < Self::ENCODED_LEN {
20487            payload_buf[0..avail_len].copy_from_slice(__input);
20488            Bytes::new(&payload_buf)
20489        } else {
20490            Bytes::new(__input)
20491        };
20492        let mut __struct = Self::default();
20493        __struct.time_usec = buf.get_u64_le();
20494        __struct.uptime_sec = buf.get_u32_le();
20495        __struct.vendor_specific_status_code = buf.get_u16_le();
20496        let tmp = buf.get_u8();
20497        __struct.health =
20498            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20499                enum_type: "UavcanNodeHealth",
20500                value: tmp as u32,
20501            })?;
20502        let tmp = buf.get_u8();
20503        __struct.mode =
20504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20505                enum_type: "UavcanNodeMode",
20506                value: tmp as u32,
20507            })?;
20508        __struct.sub_mode = buf.get_u8();
20509        Ok(__struct)
20510    }
20511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20512        let mut __tmp = BytesMut::new(bytes);
20513        #[allow(clippy::absurd_extreme_comparisons)]
20514        #[allow(unused_comparisons)]
20515        if __tmp.remaining() < Self::ENCODED_LEN {
20516            panic!(
20517                "buffer is too small (need {} bytes, but got {})",
20518                Self::ENCODED_LEN,
20519                __tmp.remaining(),
20520            )
20521        }
20522        __tmp.put_u64_le(self.time_usec);
20523        __tmp.put_u32_le(self.uptime_sec);
20524        __tmp.put_u16_le(self.vendor_specific_status_code);
20525        __tmp.put_u8(self.health as u8);
20526        __tmp.put_u8(self.mode as u8);
20527        __tmp.put_u8(self.sub_mode);
20528        if matches!(version, MavlinkVersion::V2) {
20529            let len = __tmp.len();
20530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20531        } else {
20532            __tmp.len()
20533        }
20534    }
20535}
20536#[doc = "id: 133"]
20537#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
20538#[derive(Debug, Clone, PartialEq)]
20539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20540#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20541pub struct TERRAIN_REQUEST_DATA {
20542    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
20543    pub mask: u64,
20544    #[doc = "Latitude of SW corner of first grid"]
20545    pub lat: i32,
20546    #[doc = "Longitude of SW corner of first grid"]
20547    pub lon: i32,
20548    #[doc = "Grid spacing"]
20549    pub grid_spacing: u16,
20550}
20551impl TERRAIN_REQUEST_DATA {
20552    pub const ENCODED_LEN: usize = 18usize;
20553    pub const DEFAULT: Self = Self {
20554        mask: 0_u64,
20555        lat: 0_i32,
20556        lon: 0_i32,
20557        grid_spacing: 0_u16,
20558    };
20559    #[cfg(feature = "arbitrary")]
20560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20561        use arbitrary::{Arbitrary, Unstructured};
20562        let mut buf = [0u8; 1024];
20563        rng.fill_bytes(&mut buf);
20564        let mut unstructured = Unstructured::new(&buf);
20565        Self::arbitrary(&mut unstructured).unwrap_or_default()
20566    }
20567}
20568impl Default for TERRAIN_REQUEST_DATA {
20569    fn default() -> Self {
20570        Self::DEFAULT.clone()
20571    }
20572}
20573impl MessageData for TERRAIN_REQUEST_DATA {
20574    type Message = MavMessage;
20575    const ID: u32 = 133u32;
20576    const NAME: &'static str = "TERRAIN_REQUEST";
20577    const EXTRA_CRC: u8 = 6u8;
20578    const ENCODED_LEN: usize = 18usize;
20579    fn deser(
20580        _version: MavlinkVersion,
20581        __input: &[u8],
20582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20583        let avail_len = __input.len();
20584        let mut payload_buf = [0; Self::ENCODED_LEN];
20585        let mut buf = if avail_len < Self::ENCODED_LEN {
20586            payload_buf[0..avail_len].copy_from_slice(__input);
20587            Bytes::new(&payload_buf)
20588        } else {
20589            Bytes::new(__input)
20590        };
20591        let mut __struct = Self::default();
20592        __struct.mask = buf.get_u64_le();
20593        __struct.lat = buf.get_i32_le();
20594        __struct.lon = buf.get_i32_le();
20595        __struct.grid_spacing = buf.get_u16_le();
20596        Ok(__struct)
20597    }
20598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20599        let mut __tmp = BytesMut::new(bytes);
20600        #[allow(clippy::absurd_extreme_comparisons)]
20601        #[allow(unused_comparisons)]
20602        if __tmp.remaining() < Self::ENCODED_LEN {
20603            panic!(
20604                "buffer is too small (need {} bytes, but got {})",
20605                Self::ENCODED_LEN,
20606                __tmp.remaining(),
20607            )
20608        }
20609        __tmp.put_u64_le(self.mask);
20610        __tmp.put_i32_le(self.lat);
20611        __tmp.put_i32_le(self.lon);
20612        __tmp.put_u16_le(self.grid_spacing);
20613        if matches!(version, MavlinkVersion::V2) {
20614            let len = __tmp.len();
20615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20616        } else {
20617            __tmp.len()
20618        }
20619    }
20620}
20621#[doc = "id: 260"]
20622#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
20623#[derive(Debug, Clone, PartialEq)]
20624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20626pub struct CAMERA_SETTINGS_DATA {
20627    #[doc = "Timestamp (time since system boot)."]
20628    pub time_boot_ms: u32,
20629    #[doc = "Camera mode"]
20630    pub mode_id: CameraMode,
20631    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
20632    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20633    pub zoomLevel: f32,
20634    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
20635    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20636    pub focusLevel: f32,
20637    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
20638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20639    pub camera_device_id: u8,
20640}
20641impl CAMERA_SETTINGS_DATA {
20642    pub const ENCODED_LEN: usize = 14usize;
20643    pub const DEFAULT: Self = Self {
20644        time_boot_ms: 0_u32,
20645        mode_id: CameraMode::DEFAULT,
20646        zoomLevel: 0.0_f32,
20647        focusLevel: 0.0_f32,
20648        camera_device_id: 0_u8,
20649    };
20650    #[cfg(feature = "arbitrary")]
20651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20652        use arbitrary::{Arbitrary, Unstructured};
20653        let mut buf = [0u8; 1024];
20654        rng.fill_bytes(&mut buf);
20655        let mut unstructured = Unstructured::new(&buf);
20656        Self::arbitrary(&mut unstructured).unwrap_or_default()
20657    }
20658}
20659impl Default for CAMERA_SETTINGS_DATA {
20660    fn default() -> Self {
20661        Self::DEFAULT.clone()
20662    }
20663}
20664impl MessageData for CAMERA_SETTINGS_DATA {
20665    type Message = MavMessage;
20666    const ID: u32 = 260u32;
20667    const NAME: &'static str = "CAMERA_SETTINGS";
20668    const EXTRA_CRC: u8 = 146u8;
20669    const ENCODED_LEN: usize = 14usize;
20670    fn deser(
20671        _version: MavlinkVersion,
20672        __input: &[u8],
20673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20674        let avail_len = __input.len();
20675        let mut payload_buf = [0; Self::ENCODED_LEN];
20676        let mut buf = if avail_len < Self::ENCODED_LEN {
20677            payload_buf[0..avail_len].copy_from_slice(__input);
20678            Bytes::new(&payload_buf)
20679        } else {
20680            Bytes::new(__input)
20681        };
20682        let mut __struct = Self::default();
20683        __struct.time_boot_ms = buf.get_u32_le();
20684        let tmp = buf.get_u8();
20685        __struct.mode_id =
20686            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20687                enum_type: "CameraMode",
20688                value: tmp as u32,
20689            })?;
20690        __struct.zoomLevel = buf.get_f32_le();
20691        __struct.focusLevel = buf.get_f32_le();
20692        __struct.camera_device_id = buf.get_u8();
20693        Ok(__struct)
20694    }
20695    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20696        let mut __tmp = BytesMut::new(bytes);
20697        #[allow(clippy::absurd_extreme_comparisons)]
20698        #[allow(unused_comparisons)]
20699        if __tmp.remaining() < Self::ENCODED_LEN {
20700            panic!(
20701                "buffer is too small (need {} bytes, but got {})",
20702                Self::ENCODED_LEN,
20703                __tmp.remaining(),
20704            )
20705        }
20706        __tmp.put_u32_le(self.time_boot_ms);
20707        __tmp.put_u8(self.mode_id as u8);
20708        __tmp.put_f32_le(self.zoomLevel);
20709        __tmp.put_f32_le(self.focusLevel);
20710        __tmp.put_u8(self.camera_device_id);
20711        if matches!(version, MavlinkVersion::V2) {
20712            let len = __tmp.len();
20713            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20714        } else {
20715            __tmp.len()
20716        }
20717    }
20718}
20719#[doc = "id: 85"]
20720#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
20721#[derive(Debug, Clone, PartialEq)]
20722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20724pub struct POSITION_TARGET_LOCAL_NED_DATA {
20725    #[doc = "Timestamp (time since system boot)."]
20726    pub time_boot_ms: u32,
20727    #[doc = "X Position in NED frame"]
20728    pub x: f32,
20729    #[doc = "Y Position in NED frame"]
20730    pub y: f32,
20731    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
20732    pub z: f32,
20733    #[doc = "X velocity in NED frame"]
20734    pub vx: f32,
20735    #[doc = "Y velocity in NED frame"]
20736    pub vy: f32,
20737    #[doc = "Z velocity in NED frame"]
20738    pub vz: f32,
20739    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
20740    pub afx: f32,
20741    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
20742    pub afy: f32,
20743    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
20744    pub afz: f32,
20745    #[doc = "yaw setpoint"]
20746    pub yaw: f32,
20747    #[doc = "yaw rate setpoint"]
20748    pub yaw_rate: f32,
20749    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
20750    pub type_mask: PositionTargetTypemask,
20751    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
20752    pub coordinate_frame: MavFrame,
20753}
20754impl POSITION_TARGET_LOCAL_NED_DATA {
20755    pub const ENCODED_LEN: usize = 51usize;
20756    pub const DEFAULT: Self = Self {
20757        time_boot_ms: 0_u32,
20758        x: 0.0_f32,
20759        y: 0.0_f32,
20760        z: 0.0_f32,
20761        vx: 0.0_f32,
20762        vy: 0.0_f32,
20763        vz: 0.0_f32,
20764        afx: 0.0_f32,
20765        afy: 0.0_f32,
20766        afz: 0.0_f32,
20767        yaw: 0.0_f32,
20768        yaw_rate: 0.0_f32,
20769        type_mask: PositionTargetTypemask::DEFAULT,
20770        coordinate_frame: MavFrame::DEFAULT,
20771    };
20772    #[cfg(feature = "arbitrary")]
20773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20774        use arbitrary::{Arbitrary, Unstructured};
20775        let mut buf = [0u8; 1024];
20776        rng.fill_bytes(&mut buf);
20777        let mut unstructured = Unstructured::new(&buf);
20778        Self::arbitrary(&mut unstructured).unwrap_or_default()
20779    }
20780}
20781impl Default for POSITION_TARGET_LOCAL_NED_DATA {
20782    fn default() -> Self {
20783        Self::DEFAULT.clone()
20784    }
20785}
20786impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
20787    type Message = MavMessage;
20788    const ID: u32 = 85u32;
20789    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
20790    const EXTRA_CRC: u8 = 140u8;
20791    const ENCODED_LEN: usize = 51usize;
20792    fn deser(
20793        _version: MavlinkVersion,
20794        __input: &[u8],
20795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20796        let avail_len = __input.len();
20797        let mut payload_buf = [0; Self::ENCODED_LEN];
20798        let mut buf = if avail_len < Self::ENCODED_LEN {
20799            payload_buf[0..avail_len].copy_from_slice(__input);
20800            Bytes::new(&payload_buf)
20801        } else {
20802            Bytes::new(__input)
20803        };
20804        let mut __struct = Self::default();
20805        __struct.time_boot_ms = buf.get_u32_le();
20806        __struct.x = buf.get_f32_le();
20807        __struct.y = buf.get_f32_le();
20808        __struct.z = buf.get_f32_le();
20809        __struct.vx = buf.get_f32_le();
20810        __struct.vy = buf.get_f32_le();
20811        __struct.vz = buf.get_f32_le();
20812        __struct.afx = buf.get_f32_le();
20813        __struct.afy = buf.get_f32_le();
20814        __struct.afz = buf.get_f32_le();
20815        __struct.yaw = buf.get_f32_le();
20816        __struct.yaw_rate = buf.get_f32_le();
20817        let tmp = buf.get_u16_le();
20818        __struct.type_mask = PositionTargetTypemask::from_bits(
20819            tmp & PositionTargetTypemask::all().bits(),
20820        )
20821        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
20822            flag_type: "PositionTargetTypemask",
20823            value: tmp as u32,
20824        })?;
20825        let tmp = buf.get_u8();
20826        __struct.coordinate_frame =
20827            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20828                enum_type: "MavFrame",
20829                value: tmp as u32,
20830            })?;
20831        Ok(__struct)
20832    }
20833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20834        let mut __tmp = BytesMut::new(bytes);
20835        #[allow(clippy::absurd_extreme_comparisons)]
20836        #[allow(unused_comparisons)]
20837        if __tmp.remaining() < Self::ENCODED_LEN {
20838            panic!(
20839                "buffer is too small (need {} bytes, but got {})",
20840                Self::ENCODED_LEN,
20841                __tmp.remaining(),
20842            )
20843        }
20844        __tmp.put_u32_le(self.time_boot_ms);
20845        __tmp.put_f32_le(self.x);
20846        __tmp.put_f32_le(self.y);
20847        __tmp.put_f32_le(self.z);
20848        __tmp.put_f32_le(self.vx);
20849        __tmp.put_f32_le(self.vy);
20850        __tmp.put_f32_le(self.vz);
20851        __tmp.put_f32_le(self.afx);
20852        __tmp.put_f32_le(self.afy);
20853        __tmp.put_f32_le(self.afz);
20854        __tmp.put_f32_le(self.yaw);
20855        __tmp.put_f32_le(self.yaw_rate);
20856        __tmp.put_u16_le(self.type_mask.bits());
20857        __tmp.put_u8(self.coordinate_frame as u8);
20858        if matches!(version, MavlinkVersion::V2) {
20859            let len = __tmp.len();
20860            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20861        } else {
20862            __tmp.len()
20863        }
20864    }
20865}
20866#[doc = "id: 4"]
20867#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
20868#[derive(Debug, Clone, PartialEq)]
20869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20871pub struct PING_DATA {
20872    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20873    pub time_usec: u64,
20874    #[doc = "PING sequence"]
20875    pub seq: u32,
20876    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
20877    pub target_system: u8,
20878    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
20879    pub target_component: u8,
20880}
20881impl PING_DATA {
20882    pub const ENCODED_LEN: usize = 14usize;
20883    pub const DEFAULT: Self = Self {
20884        time_usec: 0_u64,
20885        seq: 0_u32,
20886        target_system: 0_u8,
20887        target_component: 0_u8,
20888    };
20889    #[cfg(feature = "arbitrary")]
20890    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20891        use arbitrary::{Arbitrary, Unstructured};
20892        let mut buf = [0u8; 1024];
20893        rng.fill_bytes(&mut buf);
20894        let mut unstructured = Unstructured::new(&buf);
20895        Self::arbitrary(&mut unstructured).unwrap_or_default()
20896    }
20897}
20898impl Default for PING_DATA {
20899    fn default() -> Self {
20900        Self::DEFAULT.clone()
20901    }
20902}
20903impl MessageData for PING_DATA {
20904    type Message = MavMessage;
20905    const ID: u32 = 4u32;
20906    const NAME: &'static str = "PING";
20907    const EXTRA_CRC: u8 = 237u8;
20908    const ENCODED_LEN: usize = 14usize;
20909    fn deser(
20910        _version: MavlinkVersion,
20911        __input: &[u8],
20912    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20913        let avail_len = __input.len();
20914        let mut payload_buf = [0; Self::ENCODED_LEN];
20915        let mut buf = if avail_len < Self::ENCODED_LEN {
20916            payload_buf[0..avail_len].copy_from_slice(__input);
20917            Bytes::new(&payload_buf)
20918        } else {
20919            Bytes::new(__input)
20920        };
20921        let mut __struct = Self::default();
20922        __struct.time_usec = buf.get_u64_le();
20923        __struct.seq = buf.get_u32_le();
20924        __struct.target_system = buf.get_u8();
20925        __struct.target_component = buf.get_u8();
20926        Ok(__struct)
20927    }
20928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20929        let mut __tmp = BytesMut::new(bytes);
20930        #[allow(clippy::absurd_extreme_comparisons)]
20931        #[allow(unused_comparisons)]
20932        if __tmp.remaining() < Self::ENCODED_LEN {
20933            panic!(
20934                "buffer is too small (need {} bytes, but got {})",
20935                Self::ENCODED_LEN,
20936                __tmp.remaining(),
20937            )
20938        }
20939        __tmp.put_u64_le(self.time_usec);
20940        __tmp.put_u32_le(self.seq);
20941        __tmp.put_u8(self.target_system);
20942        __tmp.put_u8(self.target_component);
20943        if matches!(version, MavlinkVersion::V2) {
20944            let len = __tmp.len();
20945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20946        } else {
20947            __tmp.len()
20948        }
20949    }
20950}
20951#[doc = "id: 231"]
20952#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
20953#[derive(Debug, Clone, PartialEq)]
20954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20956pub struct WIND_COV_DATA {
20957    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20958    pub time_usec: u64,
20959    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
20960    pub wind_x: f32,
20961    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
20962    pub wind_y: f32,
20963    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
20964    pub wind_z: f32,
20965    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
20966    pub var_horiz: f32,
20967    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
20968    pub var_vert: f32,
20969    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
20970    pub wind_alt: f32,
20971    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
20972    pub horiz_accuracy: f32,
20973    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
20974    pub vert_accuracy: f32,
20975}
20976impl WIND_COV_DATA {
20977    pub const ENCODED_LEN: usize = 40usize;
20978    pub const DEFAULT: Self = Self {
20979        time_usec: 0_u64,
20980        wind_x: 0.0_f32,
20981        wind_y: 0.0_f32,
20982        wind_z: 0.0_f32,
20983        var_horiz: 0.0_f32,
20984        var_vert: 0.0_f32,
20985        wind_alt: 0.0_f32,
20986        horiz_accuracy: 0.0_f32,
20987        vert_accuracy: 0.0_f32,
20988    };
20989    #[cfg(feature = "arbitrary")]
20990    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20991        use arbitrary::{Arbitrary, Unstructured};
20992        let mut buf = [0u8; 1024];
20993        rng.fill_bytes(&mut buf);
20994        let mut unstructured = Unstructured::new(&buf);
20995        Self::arbitrary(&mut unstructured).unwrap_or_default()
20996    }
20997}
20998impl Default for WIND_COV_DATA {
20999    fn default() -> Self {
21000        Self::DEFAULT.clone()
21001    }
21002}
21003impl MessageData for WIND_COV_DATA {
21004    type Message = MavMessage;
21005    const ID: u32 = 231u32;
21006    const NAME: &'static str = "WIND_COV";
21007    const EXTRA_CRC: u8 = 105u8;
21008    const ENCODED_LEN: usize = 40usize;
21009    fn deser(
21010        _version: MavlinkVersion,
21011        __input: &[u8],
21012    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21013        let avail_len = __input.len();
21014        let mut payload_buf = [0; Self::ENCODED_LEN];
21015        let mut buf = if avail_len < Self::ENCODED_LEN {
21016            payload_buf[0..avail_len].copy_from_slice(__input);
21017            Bytes::new(&payload_buf)
21018        } else {
21019            Bytes::new(__input)
21020        };
21021        let mut __struct = Self::default();
21022        __struct.time_usec = buf.get_u64_le();
21023        __struct.wind_x = buf.get_f32_le();
21024        __struct.wind_y = buf.get_f32_le();
21025        __struct.wind_z = buf.get_f32_le();
21026        __struct.var_horiz = buf.get_f32_le();
21027        __struct.var_vert = buf.get_f32_le();
21028        __struct.wind_alt = buf.get_f32_le();
21029        __struct.horiz_accuracy = buf.get_f32_le();
21030        __struct.vert_accuracy = buf.get_f32_le();
21031        Ok(__struct)
21032    }
21033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21034        let mut __tmp = BytesMut::new(bytes);
21035        #[allow(clippy::absurd_extreme_comparisons)]
21036        #[allow(unused_comparisons)]
21037        if __tmp.remaining() < Self::ENCODED_LEN {
21038            panic!(
21039                "buffer is too small (need {} bytes, but got {})",
21040                Self::ENCODED_LEN,
21041                __tmp.remaining(),
21042            )
21043        }
21044        __tmp.put_u64_le(self.time_usec);
21045        __tmp.put_f32_le(self.wind_x);
21046        __tmp.put_f32_le(self.wind_y);
21047        __tmp.put_f32_le(self.wind_z);
21048        __tmp.put_f32_le(self.var_horiz);
21049        __tmp.put_f32_le(self.var_vert);
21050        __tmp.put_f32_le(self.wind_alt);
21051        __tmp.put_f32_le(self.horiz_accuracy);
21052        __tmp.put_f32_le(self.vert_accuracy);
21053        if matches!(version, MavlinkVersion::V2) {
21054            let len = __tmp.len();
21055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21056        } else {
21057            __tmp.len()
21058        }
21059    }
21060}
21061#[doc = "id: 350"]
21062#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
21063#[derive(Debug, Clone, PartialEq)]
21064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21066pub struct DEBUG_FLOAT_ARRAY_DATA {
21067    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21068    pub time_usec: u64,
21069    #[doc = "Unique ID used to discriminate between arrays"]
21070    pub array_id: u16,
21071    #[doc = "Name, for human-friendly display in a Ground Control Station"]
21072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21073    pub name: [u8; 10],
21074    #[doc = "data"]
21075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21076    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21077    pub data: [f32; 58],
21078}
21079impl DEBUG_FLOAT_ARRAY_DATA {
21080    pub const ENCODED_LEN: usize = 252usize;
21081    pub const DEFAULT: Self = Self {
21082        time_usec: 0_u64,
21083        array_id: 0_u16,
21084        name: [0_u8; 10usize],
21085        data: [0.0_f32; 58usize],
21086    };
21087    #[cfg(feature = "arbitrary")]
21088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21089        use arbitrary::{Arbitrary, Unstructured};
21090        let mut buf = [0u8; 1024];
21091        rng.fill_bytes(&mut buf);
21092        let mut unstructured = Unstructured::new(&buf);
21093        Self::arbitrary(&mut unstructured).unwrap_or_default()
21094    }
21095}
21096impl Default for DEBUG_FLOAT_ARRAY_DATA {
21097    fn default() -> Self {
21098        Self::DEFAULT.clone()
21099    }
21100}
21101impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
21102    type Message = MavMessage;
21103    const ID: u32 = 350u32;
21104    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
21105    const EXTRA_CRC: u8 = 232u8;
21106    const ENCODED_LEN: usize = 252usize;
21107    fn deser(
21108        _version: MavlinkVersion,
21109        __input: &[u8],
21110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21111        let avail_len = __input.len();
21112        let mut payload_buf = [0; Self::ENCODED_LEN];
21113        let mut buf = if avail_len < Self::ENCODED_LEN {
21114            payload_buf[0..avail_len].copy_from_slice(__input);
21115            Bytes::new(&payload_buf)
21116        } else {
21117            Bytes::new(__input)
21118        };
21119        let mut __struct = Self::default();
21120        __struct.time_usec = buf.get_u64_le();
21121        __struct.array_id = buf.get_u16_le();
21122        for v in &mut __struct.name {
21123            let val = buf.get_u8();
21124            *v = val;
21125        }
21126        for v in &mut __struct.data {
21127            let val = buf.get_f32_le();
21128            *v = val;
21129        }
21130        Ok(__struct)
21131    }
21132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21133        let mut __tmp = BytesMut::new(bytes);
21134        #[allow(clippy::absurd_extreme_comparisons)]
21135        #[allow(unused_comparisons)]
21136        if __tmp.remaining() < Self::ENCODED_LEN {
21137            panic!(
21138                "buffer is too small (need {} bytes, but got {})",
21139                Self::ENCODED_LEN,
21140                __tmp.remaining(),
21141            )
21142        }
21143        __tmp.put_u64_le(self.time_usec);
21144        __tmp.put_u16_le(self.array_id);
21145        for val in &self.name {
21146            __tmp.put_u8(*val);
21147        }
21148        for val in &self.data {
21149            __tmp.put_f32_le(*val);
21150        }
21151        if matches!(version, MavlinkVersion::V2) {
21152            let len = __tmp.len();
21153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21154        } else {
21155            __tmp.len()
21156        }
21157    }
21158}
21159#[doc = "id: 142"]
21160#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
21161#[derive(Debug, Clone, PartialEq)]
21162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21164pub struct RESOURCE_REQUEST_DATA {
21165    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
21166    pub request_id: u8,
21167    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
21168    pub uri_type: u8,
21169    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
21170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21171    pub uri: [u8; 120],
21172    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
21173    pub transfer_type: u8,
21174    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
21175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21176    pub storage: [u8; 120],
21177}
21178impl RESOURCE_REQUEST_DATA {
21179    pub const ENCODED_LEN: usize = 243usize;
21180    pub const DEFAULT: Self = Self {
21181        request_id: 0_u8,
21182        uri_type: 0_u8,
21183        uri: [0_u8; 120usize],
21184        transfer_type: 0_u8,
21185        storage: [0_u8; 120usize],
21186    };
21187    #[cfg(feature = "arbitrary")]
21188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21189        use arbitrary::{Arbitrary, Unstructured};
21190        let mut buf = [0u8; 1024];
21191        rng.fill_bytes(&mut buf);
21192        let mut unstructured = Unstructured::new(&buf);
21193        Self::arbitrary(&mut unstructured).unwrap_or_default()
21194    }
21195}
21196impl Default for RESOURCE_REQUEST_DATA {
21197    fn default() -> Self {
21198        Self::DEFAULT.clone()
21199    }
21200}
21201impl MessageData for RESOURCE_REQUEST_DATA {
21202    type Message = MavMessage;
21203    const ID: u32 = 142u32;
21204    const NAME: &'static str = "RESOURCE_REQUEST";
21205    const EXTRA_CRC: u8 = 72u8;
21206    const ENCODED_LEN: usize = 243usize;
21207    fn deser(
21208        _version: MavlinkVersion,
21209        __input: &[u8],
21210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21211        let avail_len = __input.len();
21212        let mut payload_buf = [0; Self::ENCODED_LEN];
21213        let mut buf = if avail_len < Self::ENCODED_LEN {
21214            payload_buf[0..avail_len].copy_from_slice(__input);
21215            Bytes::new(&payload_buf)
21216        } else {
21217            Bytes::new(__input)
21218        };
21219        let mut __struct = Self::default();
21220        __struct.request_id = buf.get_u8();
21221        __struct.uri_type = buf.get_u8();
21222        for v in &mut __struct.uri {
21223            let val = buf.get_u8();
21224            *v = val;
21225        }
21226        __struct.transfer_type = buf.get_u8();
21227        for v in &mut __struct.storage {
21228            let val = buf.get_u8();
21229            *v = val;
21230        }
21231        Ok(__struct)
21232    }
21233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21234        let mut __tmp = BytesMut::new(bytes);
21235        #[allow(clippy::absurd_extreme_comparisons)]
21236        #[allow(unused_comparisons)]
21237        if __tmp.remaining() < Self::ENCODED_LEN {
21238            panic!(
21239                "buffer is too small (need {} bytes, but got {})",
21240                Self::ENCODED_LEN,
21241                __tmp.remaining(),
21242            )
21243        }
21244        __tmp.put_u8(self.request_id);
21245        __tmp.put_u8(self.uri_type);
21246        for val in &self.uri {
21247            __tmp.put_u8(*val);
21248        }
21249        __tmp.put_u8(self.transfer_type);
21250        for val in &self.storage {
21251            __tmp.put_u8(*val);
21252        }
21253        if matches!(version, MavlinkVersion::V2) {
21254            let len = __tmp.len();
21255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21256        } else {
21257            __tmp.len()
21258        }
21259    }
21260}
21261#[doc = "id: 333"]
21262#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
21263#[derive(Debug, Clone, PartialEq)]
21264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21266pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21267    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21268    pub time_usec: u64,
21269    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
21270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21271    pub pos_x: [f32; 5],
21272    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
21273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21274    pub pos_y: [f32; 5],
21275    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
21276    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21277    pub pos_z: [f32; 5],
21278    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
21279    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21280    pub delta: [f32; 5],
21281    #[doc = "Yaw. Set to NaN for unchanged"]
21282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21283    pub pos_yaw: [f32; 5],
21284    #[doc = "Number of valid control points (up-to 5 points are possible)"]
21285    pub valid_points: u8,
21286}
21287impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21288    pub const ENCODED_LEN: usize = 109usize;
21289    pub const DEFAULT: Self = Self {
21290        time_usec: 0_u64,
21291        pos_x: [0.0_f32; 5usize],
21292        pos_y: [0.0_f32; 5usize],
21293        pos_z: [0.0_f32; 5usize],
21294        delta: [0.0_f32; 5usize],
21295        pos_yaw: [0.0_f32; 5usize],
21296        valid_points: 0_u8,
21297    };
21298    #[cfg(feature = "arbitrary")]
21299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21300        use arbitrary::{Arbitrary, Unstructured};
21301        let mut buf = [0u8; 1024];
21302        rng.fill_bytes(&mut buf);
21303        let mut unstructured = Unstructured::new(&buf);
21304        Self::arbitrary(&mut unstructured).unwrap_or_default()
21305    }
21306}
21307impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21308    fn default() -> Self {
21309        Self::DEFAULT.clone()
21310    }
21311}
21312impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
21313    type Message = MavMessage;
21314    const ID: u32 = 333u32;
21315    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
21316    const EXTRA_CRC: u8 = 231u8;
21317    const ENCODED_LEN: usize = 109usize;
21318    fn deser(
21319        _version: MavlinkVersion,
21320        __input: &[u8],
21321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21322        let avail_len = __input.len();
21323        let mut payload_buf = [0; Self::ENCODED_LEN];
21324        let mut buf = if avail_len < Self::ENCODED_LEN {
21325            payload_buf[0..avail_len].copy_from_slice(__input);
21326            Bytes::new(&payload_buf)
21327        } else {
21328            Bytes::new(__input)
21329        };
21330        let mut __struct = Self::default();
21331        __struct.time_usec = buf.get_u64_le();
21332        for v in &mut __struct.pos_x {
21333            let val = buf.get_f32_le();
21334            *v = val;
21335        }
21336        for v in &mut __struct.pos_y {
21337            let val = buf.get_f32_le();
21338            *v = val;
21339        }
21340        for v in &mut __struct.pos_z {
21341            let val = buf.get_f32_le();
21342            *v = val;
21343        }
21344        for v in &mut __struct.delta {
21345            let val = buf.get_f32_le();
21346            *v = val;
21347        }
21348        for v in &mut __struct.pos_yaw {
21349            let val = buf.get_f32_le();
21350            *v = val;
21351        }
21352        __struct.valid_points = buf.get_u8();
21353        Ok(__struct)
21354    }
21355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21356        let mut __tmp = BytesMut::new(bytes);
21357        #[allow(clippy::absurd_extreme_comparisons)]
21358        #[allow(unused_comparisons)]
21359        if __tmp.remaining() < Self::ENCODED_LEN {
21360            panic!(
21361                "buffer is too small (need {} bytes, but got {})",
21362                Self::ENCODED_LEN,
21363                __tmp.remaining(),
21364            )
21365        }
21366        __tmp.put_u64_le(self.time_usec);
21367        for val in &self.pos_x {
21368            __tmp.put_f32_le(*val);
21369        }
21370        for val in &self.pos_y {
21371            __tmp.put_f32_le(*val);
21372        }
21373        for val in &self.pos_z {
21374            __tmp.put_f32_le(*val);
21375        }
21376        for val in &self.delta {
21377            __tmp.put_f32_le(*val);
21378        }
21379        for val in &self.pos_yaw {
21380            __tmp.put_f32_le(*val);
21381        }
21382        __tmp.put_u8(self.valid_points);
21383        if matches!(version, MavlinkVersion::V2) {
21384            let len = __tmp.len();
21385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21386        } else {
21387            __tmp.len()
21388        }
21389    }
21390}
21391#[doc = "id: 111"]
21392#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
21393#[derive(Debug, Clone, PartialEq)]
21394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21396pub struct TIMESYNC_DATA {
21397    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
21398    pub tc1: i64,
21399    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
21400    pub ts1: i64,
21401    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
21402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21403    pub target_system: u8,
21404    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
21405    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21406    pub target_component: u8,
21407}
21408impl TIMESYNC_DATA {
21409    pub const ENCODED_LEN: usize = 18usize;
21410    pub const DEFAULT: Self = Self {
21411        tc1: 0_i64,
21412        ts1: 0_i64,
21413        target_system: 0_u8,
21414        target_component: 0_u8,
21415    };
21416    #[cfg(feature = "arbitrary")]
21417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21418        use arbitrary::{Arbitrary, Unstructured};
21419        let mut buf = [0u8; 1024];
21420        rng.fill_bytes(&mut buf);
21421        let mut unstructured = Unstructured::new(&buf);
21422        Self::arbitrary(&mut unstructured).unwrap_or_default()
21423    }
21424}
21425impl Default for TIMESYNC_DATA {
21426    fn default() -> Self {
21427        Self::DEFAULT.clone()
21428    }
21429}
21430impl MessageData for TIMESYNC_DATA {
21431    type Message = MavMessage;
21432    const ID: u32 = 111u32;
21433    const NAME: &'static str = "TIMESYNC";
21434    const EXTRA_CRC: u8 = 34u8;
21435    const ENCODED_LEN: usize = 18usize;
21436    fn deser(
21437        _version: MavlinkVersion,
21438        __input: &[u8],
21439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21440        let avail_len = __input.len();
21441        let mut payload_buf = [0; Self::ENCODED_LEN];
21442        let mut buf = if avail_len < Self::ENCODED_LEN {
21443            payload_buf[0..avail_len].copy_from_slice(__input);
21444            Bytes::new(&payload_buf)
21445        } else {
21446            Bytes::new(__input)
21447        };
21448        let mut __struct = Self::default();
21449        __struct.tc1 = buf.get_i64_le();
21450        __struct.ts1 = buf.get_i64_le();
21451        __struct.target_system = buf.get_u8();
21452        __struct.target_component = buf.get_u8();
21453        Ok(__struct)
21454    }
21455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21456        let mut __tmp = BytesMut::new(bytes);
21457        #[allow(clippy::absurd_extreme_comparisons)]
21458        #[allow(unused_comparisons)]
21459        if __tmp.remaining() < Self::ENCODED_LEN {
21460            panic!(
21461                "buffer is too small (need {} bytes, but got {})",
21462                Self::ENCODED_LEN,
21463                __tmp.remaining(),
21464            )
21465        }
21466        __tmp.put_i64_le(self.tc1);
21467        __tmp.put_i64_le(self.ts1);
21468        __tmp.put_u8(self.target_system);
21469        __tmp.put_u8(self.target_component);
21470        if matches!(version, MavlinkVersion::V2) {
21471            let len = __tmp.len();
21472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21473        } else {
21474            __tmp.len()
21475        }
21476    }
21477}
21478#[doc = "id: 136"]
21479#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
21480#[derive(Debug, Clone, PartialEq)]
21481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21483pub struct TERRAIN_REPORT_DATA {
21484    #[doc = "Latitude"]
21485    pub lat: i32,
21486    #[doc = "Longitude"]
21487    pub lon: i32,
21488    #[doc = "Terrain height MSL"]
21489    pub terrain_height: f32,
21490    #[doc = "Current vehicle height above lat/lon terrain height"]
21491    pub current_height: f32,
21492    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
21493    pub spacing: u16,
21494    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
21495    pub pending: u16,
21496    #[doc = "Number of 4x4 terrain blocks in memory"]
21497    pub loaded: u16,
21498}
21499impl TERRAIN_REPORT_DATA {
21500    pub const ENCODED_LEN: usize = 22usize;
21501    pub const DEFAULT: Self = Self {
21502        lat: 0_i32,
21503        lon: 0_i32,
21504        terrain_height: 0.0_f32,
21505        current_height: 0.0_f32,
21506        spacing: 0_u16,
21507        pending: 0_u16,
21508        loaded: 0_u16,
21509    };
21510    #[cfg(feature = "arbitrary")]
21511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21512        use arbitrary::{Arbitrary, Unstructured};
21513        let mut buf = [0u8; 1024];
21514        rng.fill_bytes(&mut buf);
21515        let mut unstructured = Unstructured::new(&buf);
21516        Self::arbitrary(&mut unstructured).unwrap_or_default()
21517    }
21518}
21519impl Default for TERRAIN_REPORT_DATA {
21520    fn default() -> Self {
21521        Self::DEFAULT.clone()
21522    }
21523}
21524impl MessageData for TERRAIN_REPORT_DATA {
21525    type Message = MavMessage;
21526    const ID: u32 = 136u32;
21527    const NAME: &'static str = "TERRAIN_REPORT";
21528    const EXTRA_CRC: u8 = 1u8;
21529    const ENCODED_LEN: usize = 22usize;
21530    fn deser(
21531        _version: MavlinkVersion,
21532        __input: &[u8],
21533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21534        let avail_len = __input.len();
21535        let mut payload_buf = [0; Self::ENCODED_LEN];
21536        let mut buf = if avail_len < Self::ENCODED_LEN {
21537            payload_buf[0..avail_len].copy_from_slice(__input);
21538            Bytes::new(&payload_buf)
21539        } else {
21540            Bytes::new(__input)
21541        };
21542        let mut __struct = Self::default();
21543        __struct.lat = buf.get_i32_le();
21544        __struct.lon = buf.get_i32_le();
21545        __struct.terrain_height = buf.get_f32_le();
21546        __struct.current_height = buf.get_f32_le();
21547        __struct.spacing = buf.get_u16_le();
21548        __struct.pending = buf.get_u16_le();
21549        __struct.loaded = buf.get_u16_le();
21550        Ok(__struct)
21551    }
21552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21553        let mut __tmp = BytesMut::new(bytes);
21554        #[allow(clippy::absurd_extreme_comparisons)]
21555        #[allow(unused_comparisons)]
21556        if __tmp.remaining() < Self::ENCODED_LEN {
21557            panic!(
21558                "buffer is too small (need {} bytes, but got {})",
21559                Self::ENCODED_LEN,
21560                __tmp.remaining(),
21561            )
21562        }
21563        __tmp.put_i32_le(self.lat);
21564        __tmp.put_i32_le(self.lon);
21565        __tmp.put_f32_le(self.terrain_height);
21566        __tmp.put_f32_le(self.current_height);
21567        __tmp.put_u16_le(self.spacing);
21568        __tmp.put_u16_le(self.pending);
21569        __tmp.put_u16_le(self.loaded);
21570        if matches!(version, MavlinkVersion::V2) {
21571            let len = __tmp.len();
21572            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21573        } else {
21574            __tmp.len()
21575        }
21576    }
21577}
21578#[doc = "id: 38"]
21579#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21580#[derive(Debug, Clone, PartialEq)]
21581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21583pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21584    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21585    pub start_index: i16,
21586    #[doc = "End index, equal or greater than start index."]
21587    pub end_index: i16,
21588    #[doc = "System ID"]
21589    pub target_system: u8,
21590    #[doc = "Component ID"]
21591    pub target_component: u8,
21592    #[doc = "Mission type."]
21593    #[cfg_attr(feature = "serde", serde(default))]
21594    pub mission_type: MavMissionType,
21595}
21596impl MISSION_WRITE_PARTIAL_LIST_DATA {
21597    pub const ENCODED_LEN: usize = 7usize;
21598    pub const DEFAULT: Self = Self {
21599        start_index: 0_i16,
21600        end_index: 0_i16,
21601        target_system: 0_u8,
21602        target_component: 0_u8,
21603        mission_type: MavMissionType::DEFAULT,
21604    };
21605    #[cfg(feature = "arbitrary")]
21606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21607        use arbitrary::{Arbitrary, Unstructured};
21608        let mut buf = [0u8; 1024];
21609        rng.fill_bytes(&mut buf);
21610        let mut unstructured = Unstructured::new(&buf);
21611        Self::arbitrary(&mut unstructured).unwrap_or_default()
21612    }
21613}
21614impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21615    fn default() -> Self {
21616        Self::DEFAULT.clone()
21617    }
21618}
21619impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21620    type Message = MavMessage;
21621    const ID: u32 = 38u32;
21622    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21623    const EXTRA_CRC: u8 = 9u8;
21624    const ENCODED_LEN: usize = 7usize;
21625    fn deser(
21626        _version: MavlinkVersion,
21627        __input: &[u8],
21628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21629        let avail_len = __input.len();
21630        let mut payload_buf = [0; Self::ENCODED_LEN];
21631        let mut buf = if avail_len < Self::ENCODED_LEN {
21632            payload_buf[0..avail_len].copy_from_slice(__input);
21633            Bytes::new(&payload_buf)
21634        } else {
21635            Bytes::new(__input)
21636        };
21637        let mut __struct = Self::default();
21638        __struct.start_index = buf.get_i16_le();
21639        __struct.end_index = buf.get_i16_le();
21640        __struct.target_system = buf.get_u8();
21641        __struct.target_component = buf.get_u8();
21642        let tmp = buf.get_u8();
21643        __struct.mission_type =
21644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21645                enum_type: "MavMissionType",
21646                value: tmp as u32,
21647            })?;
21648        Ok(__struct)
21649    }
21650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21651        let mut __tmp = BytesMut::new(bytes);
21652        #[allow(clippy::absurd_extreme_comparisons)]
21653        #[allow(unused_comparisons)]
21654        if __tmp.remaining() < Self::ENCODED_LEN {
21655            panic!(
21656                "buffer is too small (need {} bytes, but got {})",
21657                Self::ENCODED_LEN,
21658                __tmp.remaining(),
21659            )
21660        }
21661        __tmp.put_i16_le(self.start_index);
21662        __tmp.put_i16_le(self.end_index);
21663        __tmp.put_u8(self.target_system);
21664        __tmp.put_u8(self.target_component);
21665        __tmp.put_u8(self.mission_type as u8);
21666        if matches!(version, MavlinkVersion::V2) {
21667            let len = __tmp.len();
21668            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21669        } else {
21670            __tmp.len()
21671        }
21672    }
21673}
21674#[doc = "id: 39"]
21675#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
21676#[derive(Debug, Clone, PartialEq)]
21677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21679pub struct MISSION_ITEM_DATA {
21680    #[doc = "PARAM1, see MAV_CMD enum"]
21681    pub param1: f32,
21682    #[doc = "PARAM2, see MAV_CMD enum"]
21683    pub param2: f32,
21684    #[doc = "PARAM3, see MAV_CMD enum"]
21685    pub param3: f32,
21686    #[doc = "PARAM4, see MAV_CMD enum"]
21687    pub param4: f32,
21688    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
21689    pub x: f32,
21690    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
21691    pub y: f32,
21692    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
21693    pub z: f32,
21694    #[doc = "Sequence"]
21695    pub seq: u16,
21696    #[doc = "The scheduled action for the waypoint."]
21697    pub command: MavCmd,
21698    #[doc = "System ID"]
21699    pub target_system: u8,
21700    #[doc = "Component ID"]
21701    pub target_component: u8,
21702    #[doc = "The coordinate system of the waypoint."]
21703    pub frame: MavFrame,
21704    #[doc = "false:0, true:1"]
21705    pub current: u8,
21706    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
21707    pub autocontinue: u8,
21708    #[doc = "Mission type."]
21709    #[cfg_attr(feature = "serde", serde(default))]
21710    pub mission_type: MavMissionType,
21711}
21712impl MISSION_ITEM_DATA {
21713    pub const ENCODED_LEN: usize = 38usize;
21714    pub const DEFAULT: Self = Self {
21715        param1: 0.0_f32,
21716        param2: 0.0_f32,
21717        param3: 0.0_f32,
21718        param4: 0.0_f32,
21719        x: 0.0_f32,
21720        y: 0.0_f32,
21721        z: 0.0_f32,
21722        seq: 0_u16,
21723        command: MavCmd::DEFAULT,
21724        target_system: 0_u8,
21725        target_component: 0_u8,
21726        frame: MavFrame::DEFAULT,
21727        current: 0_u8,
21728        autocontinue: 0_u8,
21729        mission_type: MavMissionType::DEFAULT,
21730    };
21731    #[cfg(feature = "arbitrary")]
21732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21733        use arbitrary::{Arbitrary, Unstructured};
21734        let mut buf = [0u8; 1024];
21735        rng.fill_bytes(&mut buf);
21736        let mut unstructured = Unstructured::new(&buf);
21737        Self::arbitrary(&mut unstructured).unwrap_or_default()
21738    }
21739}
21740impl Default for MISSION_ITEM_DATA {
21741    fn default() -> Self {
21742        Self::DEFAULT.clone()
21743    }
21744}
21745impl MessageData for MISSION_ITEM_DATA {
21746    type Message = MavMessage;
21747    const ID: u32 = 39u32;
21748    const NAME: &'static str = "MISSION_ITEM";
21749    const EXTRA_CRC: u8 = 254u8;
21750    const ENCODED_LEN: usize = 38usize;
21751    fn deser(
21752        _version: MavlinkVersion,
21753        __input: &[u8],
21754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21755        let avail_len = __input.len();
21756        let mut payload_buf = [0; Self::ENCODED_LEN];
21757        let mut buf = if avail_len < Self::ENCODED_LEN {
21758            payload_buf[0..avail_len].copy_from_slice(__input);
21759            Bytes::new(&payload_buf)
21760        } else {
21761            Bytes::new(__input)
21762        };
21763        let mut __struct = Self::default();
21764        __struct.param1 = buf.get_f32_le();
21765        __struct.param2 = buf.get_f32_le();
21766        __struct.param3 = buf.get_f32_le();
21767        __struct.param4 = buf.get_f32_le();
21768        __struct.x = buf.get_f32_le();
21769        __struct.y = buf.get_f32_le();
21770        __struct.z = buf.get_f32_le();
21771        __struct.seq = buf.get_u16_le();
21772        let tmp = buf.get_u16_le();
21773        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21774            ::mavlink_core::error::ParserError::InvalidEnum {
21775                enum_type: "MavCmd",
21776                value: tmp as u32,
21777            },
21778        )?;
21779        __struct.target_system = buf.get_u8();
21780        __struct.target_component = buf.get_u8();
21781        let tmp = buf.get_u8();
21782        __struct.frame =
21783            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21784                enum_type: "MavFrame",
21785                value: tmp as u32,
21786            })?;
21787        __struct.current = buf.get_u8();
21788        __struct.autocontinue = buf.get_u8();
21789        let tmp = buf.get_u8();
21790        __struct.mission_type =
21791            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21792                enum_type: "MavMissionType",
21793                value: tmp as u32,
21794            })?;
21795        Ok(__struct)
21796    }
21797    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21798        let mut __tmp = BytesMut::new(bytes);
21799        #[allow(clippy::absurd_extreme_comparisons)]
21800        #[allow(unused_comparisons)]
21801        if __tmp.remaining() < Self::ENCODED_LEN {
21802            panic!(
21803                "buffer is too small (need {} bytes, but got {})",
21804                Self::ENCODED_LEN,
21805                __tmp.remaining(),
21806            )
21807        }
21808        __tmp.put_f32_le(self.param1);
21809        __tmp.put_f32_le(self.param2);
21810        __tmp.put_f32_le(self.param3);
21811        __tmp.put_f32_le(self.param4);
21812        __tmp.put_f32_le(self.x);
21813        __tmp.put_f32_le(self.y);
21814        __tmp.put_f32_le(self.z);
21815        __tmp.put_u16_le(self.seq);
21816        __tmp.put_u16_le(self.command as u16);
21817        __tmp.put_u8(self.target_system);
21818        __tmp.put_u8(self.target_component);
21819        __tmp.put_u8(self.frame as u8);
21820        __tmp.put_u8(self.current);
21821        __tmp.put_u8(self.autocontinue);
21822        __tmp.put_u8(self.mission_type as u8);
21823        if matches!(version, MavlinkVersion::V2) {
21824            let len = __tmp.len();
21825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21826        } else {
21827            __tmp.len()
21828        }
21829    }
21830}
21831#[doc = "id: 332"]
21832#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
21833#[derive(Debug, Clone, PartialEq)]
21834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21836pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
21837    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21838    pub time_usec: u64,
21839    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
21840    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21841    pub pos_x: [f32; 5],
21842    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
21843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21844    pub pos_y: [f32; 5],
21845    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
21846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21847    pub pos_z: [f32; 5],
21848    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
21849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21850    pub vel_x: [f32; 5],
21851    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
21852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21853    pub vel_y: [f32; 5],
21854    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
21855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21856    pub vel_z: [f32; 5],
21857    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
21858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21859    pub acc_x: [f32; 5],
21860    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
21861    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21862    pub acc_y: [f32; 5],
21863    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
21864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21865    pub acc_z: [f32; 5],
21866    #[doc = "Yaw angle, set to NaN if not being used"]
21867    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21868    pub pos_yaw: [f32; 5],
21869    #[doc = "Yaw rate, set to NaN if not being used"]
21870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21871    pub vel_yaw: [f32; 5],
21872    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
21873    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21874    pub command: [u16; 5],
21875    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
21876    pub valid_points: u8,
21877}
21878impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
21879    pub const ENCODED_LEN: usize = 239usize;
21880    pub const DEFAULT: Self = Self {
21881        time_usec: 0_u64,
21882        pos_x: [0.0_f32; 5usize],
21883        pos_y: [0.0_f32; 5usize],
21884        pos_z: [0.0_f32; 5usize],
21885        vel_x: [0.0_f32; 5usize],
21886        vel_y: [0.0_f32; 5usize],
21887        vel_z: [0.0_f32; 5usize],
21888        acc_x: [0.0_f32; 5usize],
21889        acc_y: [0.0_f32; 5usize],
21890        acc_z: [0.0_f32; 5usize],
21891        pos_yaw: [0.0_f32; 5usize],
21892        vel_yaw: [0.0_f32; 5usize],
21893        command: [0_u16; 5usize],
21894        valid_points: 0_u8,
21895    };
21896    #[cfg(feature = "arbitrary")]
21897    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21898        use arbitrary::{Arbitrary, Unstructured};
21899        let mut buf = [0u8; 1024];
21900        rng.fill_bytes(&mut buf);
21901        let mut unstructured = Unstructured::new(&buf);
21902        Self::arbitrary(&mut unstructured).unwrap_or_default()
21903    }
21904}
21905impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
21906    fn default() -> Self {
21907        Self::DEFAULT.clone()
21908    }
21909}
21910impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
21911    type Message = MavMessage;
21912    const ID: u32 = 332u32;
21913    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
21914    const EXTRA_CRC: u8 = 236u8;
21915    const ENCODED_LEN: usize = 239usize;
21916    fn deser(
21917        _version: MavlinkVersion,
21918        __input: &[u8],
21919    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21920        let avail_len = __input.len();
21921        let mut payload_buf = [0; Self::ENCODED_LEN];
21922        let mut buf = if avail_len < Self::ENCODED_LEN {
21923            payload_buf[0..avail_len].copy_from_slice(__input);
21924            Bytes::new(&payload_buf)
21925        } else {
21926            Bytes::new(__input)
21927        };
21928        let mut __struct = Self::default();
21929        __struct.time_usec = buf.get_u64_le();
21930        for v in &mut __struct.pos_x {
21931            let val = buf.get_f32_le();
21932            *v = val;
21933        }
21934        for v in &mut __struct.pos_y {
21935            let val = buf.get_f32_le();
21936            *v = val;
21937        }
21938        for v in &mut __struct.pos_z {
21939            let val = buf.get_f32_le();
21940            *v = val;
21941        }
21942        for v in &mut __struct.vel_x {
21943            let val = buf.get_f32_le();
21944            *v = val;
21945        }
21946        for v in &mut __struct.vel_y {
21947            let val = buf.get_f32_le();
21948            *v = val;
21949        }
21950        for v in &mut __struct.vel_z {
21951            let val = buf.get_f32_le();
21952            *v = val;
21953        }
21954        for v in &mut __struct.acc_x {
21955            let val = buf.get_f32_le();
21956            *v = val;
21957        }
21958        for v in &mut __struct.acc_y {
21959            let val = buf.get_f32_le();
21960            *v = val;
21961        }
21962        for v in &mut __struct.acc_z {
21963            let val = buf.get_f32_le();
21964            *v = val;
21965        }
21966        for v in &mut __struct.pos_yaw {
21967            let val = buf.get_f32_le();
21968            *v = val;
21969        }
21970        for v in &mut __struct.vel_yaw {
21971            let val = buf.get_f32_le();
21972            *v = val;
21973        }
21974        for v in &mut __struct.command {
21975            let val = buf.get_u16_le();
21976            *v = val;
21977        }
21978        __struct.valid_points = buf.get_u8();
21979        Ok(__struct)
21980    }
21981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21982        let mut __tmp = BytesMut::new(bytes);
21983        #[allow(clippy::absurd_extreme_comparisons)]
21984        #[allow(unused_comparisons)]
21985        if __tmp.remaining() < Self::ENCODED_LEN {
21986            panic!(
21987                "buffer is too small (need {} bytes, but got {})",
21988                Self::ENCODED_LEN,
21989                __tmp.remaining(),
21990            )
21991        }
21992        __tmp.put_u64_le(self.time_usec);
21993        for val in &self.pos_x {
21994            __tmp.put_f32_le(*val);
21995        }
21996        for val in &self.pos_y {
21997            __tmp.put_f32_le(*val);
21998        }
21999        for val in &self.pos_z {
22000            __tmp.put_f32_le(*val);
22001        }
22002        for val in &self.vel_x {
22003            __tmp.put_f32_le(*val);
22004        }
22005        for val in &self.vel_y {
22006            __tmp.put_f32_le(*val);
22007        }
22008        for val in &self.vel_z {
22009            __tmp.put_f32_le(*val);
22010        }
22011        for val in &self.acc_x {
22012            __tmp.put_f32_le(*val);
22013        }
22014        for val in &self.acc_y {
22015            __tmp.put_f32_le(*val);
22016        }
22017        for val in &self.acc_z {
22018            __tmp.put_f32_le(*val);
22019        }
22020        for val in &self.pos_yaw {
22021            __tmp.put_f32_le(*val);
22022        }
22023        for val in &self.vel_yaw {
22024            __tmp.put_f32_le(*val);
22025        }
22026        for val in &self.command {
22027            __tmp.put_u16_le(*val);
22028        }
22029        __tmp.put_u8(self.valid_points);
22030        if matches!(version, MavlinkVersion::V2) {
22031            let len = __tmp.len();
22032            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22033        } else {
22034            __tmp.len()
22035        }
22036    }
22037}
22038#[doc = "id: 232"]
22039#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
22040#[derive(Debug, Clone, PartialEq)]
22041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22043pub struct GPS_INPUT_DATA {
22044    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22045    pub time_usec: u64,
22046    #[doc = "GPS time (from start of GPS week)"]
22047    pub time_week_ms: u32,
22048    #[doc = "Latitude (WGS84)"]
22049    pub lat: i32,
22050    #[doc = "Longitude (WGS84)"]
22051    pub lon: i32,
22052    #[doc = "Altitude (MSL). Positive for up."]
22053    pub alt: f32,
22054    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
22055    pub hdop: f32,
22056    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
22057    pub vdop: f32,
22058    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
22059    pub vn: f32,
22060    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
22061    pub ve: f32,
22062    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
22063    pub vd: f32,
22064    #[doc = "GPS speed accuracy"]
22065    pub speed_accuracy: f32,
22066    #[doc = "GPS horizontal accuracy"]
22067    pub horiz_accuracy: f32,
22068    #[doc = "GPS vertical accuracy"]
22069    pub vert_accuracy: f32,
22070    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
22071    pub ignore_flags: GpsInputIgnoreFlags,
22072    #[doc = "GPS week number"]
22073    pub time_week: u16,
22074    #[doc = "ID of the GPS for multiple GPS inputs"]
22075    pub gps_id: u8,
22076    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
22077    pub fix_type: u8,
22078    #[doc = "Number of satellites visible."]
22079    pub satellites_visible: u8,
22080    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
22081    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22082    pub yaw: u16,
22083}
22084impl GPS_INPUT_DATA {
22085    pub const ENCODED_LEN: usize = 65usize;
22086    pub const DEFAULT: Self = Self {
22087        time_usec: 0_u64,
22088        time_week_ms: 0_u32,
22089        lat: 0_i32,
22090        lon: 0_i32,
22091        alt: 0.0_f32,
22092        hdop: 0.0_f32,
22093        vdop: 0.0_f32,
22094        vn: 0.0_f32,
22095        ve: 0.0_f32,
22096        vd: 0.0_f32,
22097        speed_accuracy: 0.0_f32,
22098        horiz_accuracy: 0.0_f32,
22099        vert_accuracy: 0.0_f32,
22100        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
22101        time_week: 0_u16,
22102        gps_id: 0_u8,
22103        fix_type: 0_u8,
22104        satellites_visible: 0_u8,
22105        yaw: 0_u16,
22106    };
22107    #[cfg(feature = "arbitrary")]
22108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22109        use arbitrary::{Arbitrary, Unstructured};
22110        let mut buf = [0u8; 1024];
22111        rng.fill_bytes(&mut buf);
22112        let mut unstructured = Unstructured::new(&buf);
22113        Self::arbitrary(&mut unstructured).unwrap_or_default()
22114    }
22115}
22116impl Default for GPS_INPUT_DATA {
22117    fn default() -> Self {
22118        Self::DEFAULT.clone()
22119    }
22120}
22121impl MessageData for GPS_INPUT_DATA {
22122    type Message = MavMessage;
22123    const ID: u32 = 232u32;
22124    const NAME: &'static str = "GPS_INPUT";
22125    const EXTRA_CRC: u8 = 151u8;
22126    const ENCODED_LEN: usize = 65usize;
22127    fn deser(
22128        _version: MavlinkVersion,
22129        __input: &[u8],
22130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22131        let avail_len = __input.len();
22132        let mut payload_buf = [0; Self::ENCODED_LEN];
22133        let mut buf = if avail_len < Self::ENCODED_LEN {
22134            payload_buf[0..avail_len].copy_from_slice(__input);
22135            Bytes::new(&payload_buf)
22136        } else {
22137            Bytes::new(__input)
22138        };
22139        let mut __struct = Self::default();
22140        __struct.time_usec = buf.get_u64_le();
22141        __struct.time_week_ms = buf.get_u32_le();
22142        __struct.lat = buf.get_i32_le();
22143        __struct.lon = buf.get_i32_le();
22144        __struct.alt = buf.get_f32_le();
22145        __struct.hdop = buf.get_f32_le();
22146        __struct.vdop = buf.get_f32_le();
22147        __struct.vn = buf.get_f32_le();
22148        __struct.ve = buf.get_f32_le();
22149        __struct.vd = buf.get_f32_le();
22150        __struct.speed_accuracy = buf.get_f32_le();
22151        __struct.horiz_accuracy = buf.get_f32_le();
22152        __struct.vert_accuracy = buf.get_f32_le();
22153        let tmp = buf.get_u16_le();
22154        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
22155            tmp & GpsInputIgnoreFlags::all().bits(),
22156        )
22157        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22158            flag_type: "GpsInputIgnoreFlags",
22159            value: tmp as u32,
22160        })?;
22161        __struct.time_week = buf.get_u16_le();
22162        __struct.gps_id = buf.get_u8();
22163        __struct.fix_type = buf.get_u8();
22164        __struct.satellites_visible = buf.get_u8();
22165        __struct.yaw = buf.get_u16_le();
22166        Ok(__struct)
22167    }
22168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22169        let mut __tmp = BytesMut::new(bytes);
22170        #[allow(clippy::absurd_extreme_comparisons)]
22171        #[allow(unused_comparisons)]
22172        if __tmp.remaining() < Self::ENCODED_LEN {
22173            panic!(
22174                "buffer is too small (need {} bytes, but got {})",
22175                Self::ENCODED_LEN,
22176                __tmp.remaining(),
22177            )
22178        }
22179        __tmp.put_u64_le(self.time_usec);
22180        __tmp.put_u32_le(self.time_week_ms);
22181        __tmp.put_i32_le(self.lat);
22182        __tmp.put_i32_le(self.lon);
22183        __tmp.put_f32_le(self.alt);
22184        __tmp.put_f32_le(self.hdop);
22185        __tmp.put_f32_le(self.vdop);
22186        __tmp.put_f32_le(self.vn);
22187        __tmp.put_f32_le(self.ve);
22188        __tmp.put_f32_le(self.vd);
22189        __tmp.put_f32_le(self.speed_accuracy);
22190        __tmp.put_f32_le(self.horiz_accuracy);
22191        __tmp.put_f32_le(self.vert_accuracy);
22192        __tmp.put_u16_le(self.ignore_flags.bits());
22193        __tmp.put_u16_le(self.time_week);
22194        __tmp.put_u8(self.gps_id);
22195        __tmp.put_u8(self.fix_type);
22196        __tmp.put_u8(self.satellites_visible);
22197        __tmp.put_u16_le(self.yaw);
22198        if matches!(version, MavlinkVersion::V2) {
22199            let len = __tmp.len();
22200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22201        } else {
22202            __tmp.len()
22203        }
22204    }
22205}
22206#[doc = "id: 24"]
22207#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
22208#[derive(Debug, Clone, PartialEq)]
22209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22211pub struct GPS_RAW_INT_DATA {
22212    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22213    pub time_usec: u64,
22214    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
22215    pub lat: i32,
22216    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
22217    pub lon: i32,
22218    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
22219    pub alt: i32,
22220    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
22221    pub eph: u16,
22222    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
22223    pub epv: u16,
22224    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
22225    pub vel: u16,
22226    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
22227    pub cog: u16,
22228    #[doc = "GPS fix type."]
22229    pub fix_type: GpsFixType,
22230    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
22231    pub satellites_visible: u8,
22232    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
22233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22234    pub alt_ellipsoid: i32,
22235    #[doc = "Position uncertainty."]
22236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22237    pub h_acc: u32,
22238    #[doc = "Altitude uncertainty."]
22239    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22240    pub v_acc: u32,
22241    #[doc = "Speed uncertainty."]
22242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22243    pub vel_acc: u32,
22244    #[doc = "Heading / track uncertainty"]
22245    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22246    pub hdg_acc: u32,
22247    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
22248    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22249    pub yaw: u16,
22250}
22251impl GPS_RAW_INT_DATA {
22252    pub const ENCODED_LEN: usize = 52usize;
22253    pub const DEFAULT: Self = Self {
22254        time_usec: 0_u64,
22255        lat: 0_i32,
22256        lon: 0_i32,
22257        alt: 0_i32,
22258        eph: 0_u16,
22259        epv: 0_u16,
22260        vel: 0_u16,
22261        cog: 0_u16,
22262        fix_type: GpsFixType::DEFAULT,
22263        satellites_visible: 0_u8,
22264        alt_ellipsoid: 0_i32,
22265        h_acc: 0_u32,
22266        v_acc: 0_u32,
22267        vel_acc: 0_u32,
22268        hdg_acc: 0_u32,
22269        yaw: 0_u16,
22270    };
22271    #[cfg(feature = "arbitrary")]
22272    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22273        use arbitrary::{Arbitrary, Unstructured};
22274        let mut buf = [0u8; 1024];
22275        rng.fill_bytes(&mut buf);
22276        let mut unstructured = Unstructured::new(&buf);
22277        Self::arbitrary(&mut unstructured).unwrap_or_default()
22278    }
22279}
22280impl Default for GPS_RAW_INT_DATA {
22281    fn default() -> Self {
22282        Self::DEFAULT.clone()
22283    }
22284}
22285impl MessageData for GPS_RAW_INT_DATA {
22286    type Message = MavMessage;
22287    const ID: u32 = 24u32;
22288    const NAME: &'static str = "GPS_RAW_INT";
22289    const EXTRA_CRC: u8 = 24u8;
22290    const ENCODED_LEN: usize = 52usize;
22291    fn deser(
22292        _version: MavlinkVersion,
22293        __input: &[u8],
22294    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22295        let avail_len = __input.len();
22296        let mut payload_buf = [0; Self::ENCODED_LEN];
22297        let mut buf = if avail_len < Self::ENCODED_LEN {
22298            payload_buf[0..avail_len].copy_from_slice(__input);
22299            Bytes::new(&payload_buf)
22300        } else {
22301            Bytes::new(__input)
22302        };
22303        let mut __struct = Self::default();
22304        __struct.time_usec = buf.get_u64_le();
22305        __struct.lat = buf.get_i32_le();
22306        __struct.lon = buf.get_i32_le();
22307        __struct.alt = buf.get_i32_le();
22308        __struct.eph = buf.get_u16_le();
22309        __struct.epv = buf.get_u16_le();
22310        __struct.vel = buf.get_u16_le();
22311        __struct.cog = buf.get_u16_le();
22312        let tmp = buf.get_u8();
22313        __struct.fix_type =
22314            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22315                enum_type: "GpsFixType",
22316                value: tmp as u32,
22317            })?;
22318        __struct.satellites_visible = buf.get_u8();
22319        __struct.alt_ellipsoid = buf.get_i32_le();
22320        __struct.h_acc = buf.get_u32_le();
22321        __struct.v_acc = buf.get_u32_le();
22322        __struct.vel_acc = buf.get_u32_le();
22323        __struct.hdg_acc = buf.get_u32_le();
22324        __struct.yaw = buf.get_u16_le();
22325        Ok(__struct)
22326    }
22327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22328        let mut __tmp = BytesMut::new(bytes);
22329        #[allow(clippy::absurd_extreme_comparisons)]
22330        #[allow(unused_comparisons)]
22331        if __tmp.remaining() < Self::ENCODED_LEN {
22332            panic!(
22333                "buffer is too small (need {} bytes, but got {})",
22334                Self::ENCODED_LEN,
22335                __tmp.remaining(),
22336            )
22337        }
22338        __tmp.put_u64_le(self.time_usec);
22339        __tmp.put_i32_le(self.lat);
22340        __tmp.put_i32_le(self.lon);
22341        __tmp.put_i32_le(self.alt);
22342        __tmp.put_u16_le(self.eph);
22343        __tmp.put_u16_le(self.epv);
22344        __tmp.put_u16_le(self.vel);
22345        __tmp.put_u16_le(self.cog);
22346        __tmp.put_u8(self.fix_type as u8);
22347        __tmp.put_u8(self.satellites_visible);
22348        __tmp.put_i32_le(self.alt_ellipsoid);
22349        __tmp.put_u32_le(self.h_acc);
22350        __tmp.put_u32_le(self.v_acc);
22351        __tmp.put_u32_le(self.vel_acc);
22352        __tmp.put_u32_le(self.hdg_acc);
22353        __tmp.put_u16_le(self.yaw);
22354        if matches!(version, MavlinkVersion::V2) {
22355            let len = __tmp.len();
22356            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22357        } else {
22358            __tmp.len()
22359        }
22360    }
22361}
22362#[doc = "id: 35"]
22363#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
22364#[derive(Debug, Clone, PartialEq)]
22365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22367pub struct RC_CHANNELS_RAW_DATA {
22368    #[doc = "Timestamp (time since system boot)."]
22369    pub time_boot_ms: u32,
22370    #[doc = "RC channel 1 value."]
22371    pub chan1_raw: u16,
22372    #[doc = "RC channel 2 value."]
22373    pub chan2_raw: u16,
22374    #[doc = "RC channel 3 value."]
22375    pub chan3_raw: u16,
22376    #[doc = "RC channel 4 value."]
22377    pub chan4_raw: u16,
22378    #[doc = "RC channel 5 value."]
22379    pub chan5_raw: u16,
22380    #[doc = "RC channel 6 value."]
22381    pub chan6_raw: u16,
22382    #[doc = "RC channel 7 value."]
22383    pub chan7_raw: u16,
22384    #[doc = "RC channel 8 value."]
22385    pub chan8_raw: u16,
22386    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
22387    pub port: u8,
22388    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
22389    pub rssi: u8,
22390}
22391impl RC_CHANNELS_RAW_DATA {
22392    pub const ENCODED_LEN: usize = 22usize;
22393    pub const DEFAULT: Self = Self {
22394        time_boot_ms: 0_u32,
22395        chan1_raw: 0_u16,
22396        chan2_raw: 0_u16,
22397        chan3_raw: 0_u16,
22398        chan4_raw: 0_u16,
22399        chan5_raw: 0_u16,
22400        chan6_raw: 0_u16,
22401        chan7_raw: 0_u16,
22402        chan8_raw: 0_u16,
22403        port: 0_u8,
22404        rssi: 0_u8,
22405    };
22406    #[cfg(feature = "arbitrary")]
22407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22408        use arbitrary::{Arbitrary, Unstructured};
22409        let mut buf = [0u8; 1024];
22410        rng.fill_bytes(&mut buf);
22411        let mut unstructured = Unstructured::new(&buf);
22412        Self::arbitrary(&mut unstructured).unwrap_or_default()
22413    }
22414}
22415impl Default for RC_CHANNELS_RAW_DATA {
22416    fn default() -> Self {
22417        Self::DEFAULT.clone()
22418    }
22419}
22420impl MessageData for RC_CHANNELS_RAW_DATA {
22421    type Message = MavMessage;
22422    const ID: u32 = 35u32;
22423    const NAME: &'static str = "RC_CHANNELS_RAW";
22424    const EXTRA_CRC: u8 = 244u8;
22425    const ENCODED_LEN: usize = 22usize;
22426    fn deser(
22427        _version: MavlinkVersion,
22428        __input: &[u8],
22429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22430        let avail_len = __input.len();
22431        let mut payload_buf = [0; Self::ENCODED_LEN];
22432        let mut buf = if avail_len < Self::ENCODED_LEN {
22433            payload_buf[0..avail_len].copy_from_slice(__input);
22434            Bytes::new(&payload_buf)
22435        } else {
22436            Bytes::new(__input)
22437        };
22438        let mut __struct = Self::default();
22439        __struct.time_boot_ms = buf.get_u32_le();
22440        __struct.chan1_raw = buf.get_u16_le();
22441        __struct.chan2_raw = buf.get_u16_le();
22442        __struct.chan3_raw = buf.get_u16_le();
22443        __struct.chan4_raw = buf.get_u16_le();
22444        __struct.chan5_raw = buf.get_u16_le();
22445        __struct.chan6_raw = buf.get_u16_le();
22446        __struct.chan7_raw = buf.get_u16_le();
22447        __struct.chan8_raw = buf.get_u16_le();
22448        __struct.port = buf.get_u8();
22449        __struct.rssi = buf.get_u8();
22450        Ok(__struct)
22451    }
22452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22453        let mut __tmp = BytesMut::new(bytes);
22454        #[allow(clippy::absurd_extreme_comparisons)]
22455        #[allow(unused_comparisons)]
22456        if __tmp.remaining() < Self::ENCODED_LEN {
22457            panic!(
22458                "buffer is too small (need {} bytes, but got {})",
22459                Self::ENCODED_LEN,
22460                __tmp.remaining(),
22461            )
22462        }
22463        __tmp.put_u32_le(self.time_boot_ms);
22464        __tmp.put_u16_le(self.chan1_raw);
22465        __tmp.put_u16_le(self.chan2_raw);
22466        __tmp.put_u16_le(self.chan3_raw);
22467        __tmp.put_u16_le(self.chan4_raw);
22468        __tmp.put_u16_le(self.chan5_raw);
22469        __tmp.put_u16_le(self.chan6_raw);
22470        __tmp.put_u16_le(self.chan7_raw);
22471        __tmp.put_u16_le(self.chan8_raw);
22472        __tmp.put_u8(self.port);
22473        __tmp.put_u8(self.rssi);
22474        if matches!(version, MavlinkVersion::V2) {
22475            let len = __tmp.len();
22476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22477        } else {
22478            __tmp.len()
22479        }
22480    }
22481}
22482#[doc = "id: 143"]
22483#[doc = "Barometer readings for 3rd barometer."]
22484#[derive(Debug, Clone, PartialEq)]
22485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22487pub struct SCALED_PRESSURE3_DATA {
22488    #[doc = "Timestamp (time since system boot)."]
22489    pub time_boot_ms: u32,
22490    #[doc = "Absolute pressure"]
22491    pub press_abs: f32,
22492    #[doc = "Differential pressure"]
22493    pub press_diff: f32,
22494    #[doc = "Absolute pressure temperature"]
22495    pub temperature: i16,
22496    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
22497    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22498    pub temperature_press_diff: i16,
22499}
22500impl SCALED_PRESSURE3_DATA {
22501    pub const ENCODED_LEN: usize = 16usize;
22502    pub const DEFAULT: Self = Self {
22503        time_boot_ms: 0_u32,
22504        press_abs: 0.0_f32,
22505        press_diff: 0.0_f32,
22506        temperature: 0_i16,
22507        temperature_press_diff: 0_i16,
22508    };
22509    #[cfg(feature = "arbitrary")]
22510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22511        use arbitrary::{Arbitrary, Unstructured};
22512        let mut buf = [0u8; 1024];
22513        rng.fill_bytes(&mut buf);
22514        let mut unstructured = Unstructured::new(&buf);
22515        Self::arbitrary(&mut unstructured).unwrap_or_default()
22516    }
22517}
22518impl Default for SCALED_PRESSURE3_DATA {
22519    fn default() -> Self {
22520        Self::DEFAULT.clone()
22521    }
22522}
22523impl MessageData for SCALED_PRESSURE3_DATA {
22524    type Message = MavMessage;
22525    const ID: u32 = 143u32;
22526    const NAME: &'static str = "SCALED_PRESSURE3";
22527    const EXTRA_CRC: u8 = 131u8;
22528    const ENCODED_LEN: usize = 16usize;
22529    fn deser(
22530        _version: MavlinkVersion,
22531        __input: &[u8],
22532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22533        let avail_len = __input.len();
22534        let mut payload_buf = [0; Self::ENCODED_LEN];
22535        let mut buf = if avail_len < Self::ENCODED_LEN {
22536            payload_buf[0..avail_len].copy_from_slice(__input);
22537            Bytes::new(&payload_buf)
22538        } else {
22539            Bytes::new(__input)
22540        };
22541        let mut __struct = Self::default();
22542        __struct.time_boot_ms = buf.get_u32_le();
22543        __struct.press_abs = buf.get_f32_le();
22544        __struct.press_diff = buf.get_f32_le();
22545        __struct.temperature = buf.get_i16_le();
22546        __struct.temperature_press_diff = buf.get_i16_le();
22547        Ok(__struct)
22548    }
22549    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22550        let mut __tmp = BytesMut::new(bytes);
22551        #[allow(clippy::absurd_extreme_comparisons)]
22552        #[allow(unused_comparisons)]
22553        if __tmp.remaining() < Self::ENCODED_LEN {
22554            panic!(
22555                "buffer is too small (need {} bytes, but got {})",
22556                Self::ENCODED_LEN,
22557                __tmp.remaining(),
22558            )
22559        }
22560        __tmp.put_u32_le(self.time_boot_ms);
22561        __tmp.put_f32_le(self.press_abs);
22562        __tmp.put_f32_le(self.press_diff);
22563        __tmp.put_i16_le(self.temperature);
22564        __tmp.put_i16_le(self.temperature_press_diff);
22565        if matches!(version, MavlinkVersion::V2) {
22566            let len = __tmp.len();
22567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22568        } else {
22569            __tmp.len()
22570        }
22571    }
22572}
22573#[doc = "id: 83"]
22574#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
22575#[derive(Debug, Clone, PartialEq)]
22576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22578pub struct ATTITUDE_TARGET_DATA {
22579    #[doc = "Timestamp (time since system boot)."]
22580    pub time_boot_ms: u32,
22581    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
22582    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22583    pub q: [f32; 4],
22584    #[doc = "Body roll rate"]
22585    pub body_roll_rate: f32,
22586    #[doc = "Body pitch rate"]
22587    pub body_pitch_rate: f32,
22588    #[doc = "Body yaw rate"]
22589    pub body_yaw_rate: f32,
22590    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
22591    pub thrust: f32,
22592    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
22593    pub type_mask: AttitudeTargetTypemask,
22594}
22595impl ATTITUDE_TARGET_DATA {
22596    pub const ENCODED_LEN: usize = 37usize;
22597    pub const DEFAULT: Self = Self {
22598        time_boot_ms: 0_u32,
22599        q: [0.0_f32; 4usize],
22600        body_roll_rate: 0.0_f32,
22601        body_pitch_rate: 0.0_f32,
22602        body_yaw_rate: 0.0_f32,
22603        thrust: 0.0_f32,
22604        type_mask: AttitudeTargetTypemask::DEFAULT,
22605    };
22606    #[cfg(feature = "arbitrary")]
22607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22608        use arbitrary::{Arbitrary, Unstructured};
22609        let mut buf = [0u8; 1024];
22610        rng.fill_bytes(&mut buf);
22611        let mut unstructured = Unstructured::new(&buf);
22612        Self::arbitrary(&mut unstructured).unwrap_or_default()
22613    }
22614}
22615impl Default for ATTITUDE_TARGET_DATA {
22616    fn default() -> Self {
22617        Self::DEFAULT.clone()
22618    }
22619}
22620impl MessageData for ATTITUDE_TARGET_DATA {
22621    type Message = MavMessage;
22622    const ID: u32 = 83u32;
22623    const NAME: &'static str = "ATTITUDE_TARGET";
22624    const EXTRA_CRC: u8 = 22u8;
22625    const ENCODED_LEN: usize = 37usize;
22626    fn deser(
22627        _version: MavlinkVersion,
22628        __input: &[u8],
22629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22630        let avail_len = __input.len();
22631        let mut payload_buf = [0; Self::ENCODED_LEN];
22632        let mut buf = if avail_len < Self::ENCODED_LEN {
22633            payload_buf[0..avail_len].copy_from_slice(__input);
22634            Bytes::new(&payload_buf)
22635        } else {
22636            Bytes::new(__input)
22637        };
22638        let mut __struct = Self::default();
22639        __struct.time_boot_ms = buf.get_u32_le();
22640        for v in &mut __struct.q {
22641            let val = buf.get_f32_le();
22642            *v = val;
22643        }
22644        __struct.body_roll_rate = buf.get_f32_le();
22645        __struct.body_pitch_rate = buf.get_f32_le();
22646        __struct.body_yaw_rate = buf.get_f32_le();
22647        __struct.thrust = buf.get_f32_le();
22648        let tmp = buf.get_u8();
22649        __struct.type_mask = AttitudeTargetTypemask::from_bits(
22650            tmp & AttitudeTargetTypemask::all().bits(),
22651        )
22652        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22653            flag_type: "AttitudeTargetTypemask",
22654            value: tmp as u32,
22655        })?;
22656        Ok(__struct)
22657    }
22658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22659        let mut __tmp = BytesMut::new(bytes);
22660        #[allow(clippy::absurd_extreme_comparisons)]
22661        #[allow(unused_comparisons)]
22662        if __tmp.remaining() < Self::ENCODED_LEN {
22663            panic!(
22664                "buffer is too small (need {} bytes, but got {})",
22665                Self::ENCODED_LEN,
22666                __tmp.remaining(),
22667            )
22668        }
22669        __tmp.put_u32_le(self.time_boot_ms);
22670        for val in &self.q {
22671            __tmp.put_f32_le(*val);
22672        }
22673        __tmp.put_f32_le(self.body_roll_rate);
22674        __tmp.put_f32_le(self.body_pitch_rate);
22675        __tmp.put_f32_le(self.body_yaw_rate);
22676        __tmp.put_f32_le(self.thrust);
22677        __tmp.put_u8(self.type_mask.bits());
22678        if matches!(version, MavlinkVersion::V2) {
22679            let len = __tmp.len();
22680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22681        } else {
22682            __tmp.len()
22683        }
22684    }
22685}
22686#[doc = "id: 285"]
22687#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
22688#[derive(Debug, Clone, PartialEq)]
22689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22691pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
22692    #[doc = "Timestamp (time since system boot)."]
22693    pub time_boot_ms: u32,
22694    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
22695    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22696    pub q: [f32; 4],
22697    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
22698    pub angular_velocity_x: f32,
22699    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
22700    pub angular_velocity_y: f32,
22701    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
22702    pub angular_velocity_z: f32,
22703    #[doc = "Failure flags (0 for no failure)"]
22704    pub failure_flags: GimbalDeviceErrorFlags,
22705    #[doc = "Current gimbal flags set."]
22706    pub flags: GimbalDeviceFlags,
22707    #[doc = "System ID"]
22708    pub target_system: u8,
22709    #[doc = "Component ID"]
22710    pub target_component: u8,
22711    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
22712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22713    pub delta_yaw: f32,
22714    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
22715    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22716    pub delta_yaw_velocity: f32,
22717    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
22718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22719    pub gimbal_device_id: u8,
22720}
22721impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
22722    pub const ENCODED_LEN: usize = 49usize;
22723    pub const DEFAULT: Self = Self {
22724        time_boot_ms: 0_u32,
22725        q: [0.0_f32; 4usize],
22726        angular_velocity_x: 0.0_f32,
22727        angular_velocity_y: 0.0_f32,
22728        angular_velocity_z: 0.0_f32,
22729        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
22730        flags: GimbalDeviceFlags::DEFAULT,
22731        target_system: 0_u8,
22732        target_component: 0_u8,
22733        delta_yaw: 0.0_f32,
22734        delta_yaw_velocity: 0.0_f32,
22735        gimbal_device_id: 0_u8,
22736    };
22737    #[cfg(feature = "arbitrary")]
22738    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22739        use arbitrary::{Arbitrary, Unstructured};
22740        let mut buf = [0u8; 1024];
22741        rng.fill_bytes(&mut buf);
22742        let mut unstructured = Unstructured::new(&buf);
22743        Self::arbitrary(&mut unstructured).unwrap_or_default()
22744    }
22745}
22746impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
22747    fn default() -> Self {
22748        Self::DEFAULT.clone()
22749    }
22750}
22751impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
22752    type Message = MavMessage;
22753    const ID: u32 = 285u32;
22754    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
22755    const EXTRA_CRC: u8 = 137u8;
22756    const ENCODED_LEN: usize = 49usize;
22757    fn deser(
22758        _version: MavlinkVersion,
22759        __input: &[u8],
22760    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22761        let avail_len = __input.len();
22762        let mut payload_buf = [0; Self::ENCODED_LEN];
22763        let mut buf = if avail_len < Self::ENCODED_LEN {
22764            payload_buf[0..avail_len].copy_from_slice(__input);
22765            Bytes::new(&payload_buf)
22766        } else {
22767            Bytes::new(__input)
22768        };
22769        let mut __struct = Self::default();
22770        __struct.time_boot_ms = buf.get_u32_le();
22771        for v in &mut __struct.q {
22772            let val = buf.get_f32_le();
22773            *v = val;
22774        }
22775        __struct.angular_velocity_x = buf.get_f32_le();
22776        __struct.angular_velocity_y = buf.get_f32_le();
22777        __struct.angular_velocity_z = buf.get_f32_le();
22778        let tmp = buf.get_u32_le();
22779        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
22780            tmp & GimbalDeviceErrorFlags::all().bits(),
22781        )
22782        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22783            flag_type: "GimbalDeviceErrorFlags",
22784            value: tmp as u32,
22785        })?;
22786        let tmp = buf.get_u16_le();
22787        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
22788            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22789                flag_type: "GimbalDeviceFlags",
22790                value: tmp as u32,
22791            })?;
22792        __struct.target_system = buf.get_u8();
22793        __struct.target_component = buf.get_u8();
22794        __struct.delta_yaw = buf.get_f32_le();
22795        __struct.delta_yaw_velocity = buf.get_f32_le();
22796        __struct.gimbal_device_id = buf.get_u8();
22797        Ok(__struct)
22798    }
22799    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22800        let mut __tmp = BytesMut::new(bytes);
22801        #[allow(clippy::absurd_extreme_comparisons)]
22802        #[allow(unused_comparisons)]
22803        if __tmp.remaining() < Self::ENCODED_LEN {
22804            panic!(
22805                "buffer is too small (need {} bytes, but got {})",
22806                Self::ENCODED_LEN,
22807                __tmp.remaining(),
22808            )
22809        }
22810        __tmp.put_u32_le(self.time_boot_ms);
22811        for val in &self.q {
22812            __tmp.put_f32_le(*val);
22813        }
22814        __tmp.put_f32_le(self.angular_velocity_x);
22815        __tmp.put_f32_le(self.angular_velocity_y);
22816        __tmp.put_f32_le(self.angular_velocity_z);
22817        __tmp.put_u32_le(self.failure_flags.bits());
22818        __tmp.put_u16_le(self.flags.bits());
22819        __tmp.put_u8(self.target_system);
22820        __tmp.put_u8(self.target_component);
22821        __tmp.put_f32_le(self.delta_yaw);
22822        __tmp.put_f32_le(self.delta_yaw_velocity);
22823        __tmp.put_u8(self.gimbal_device_id);
22824        if matches!(version, MavlinkVersion::V2) {
22825            let len = __tmp.len();
22826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22827        } else {
22828            __tmp.len()
22829        }
22830    }
22831}
22832#[doc = "id: 287"]
22833#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
22834#[derive(Debug, Clone, PartialEq)]
22835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22837pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22838    #[doc = "High level gimbal manager flags to use."]
22839    pub flags: GimbalManagerFlags,
22840    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
22841    pub pitch: f32,
22842    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
22843    pub yaw: f32,
22844    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
22845    pub pitch_rate: f32,
22846    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
22847    pub yaw_rate: f32,
22848    #[doc = "System ID"]
22849    pub target_system: u8,
22850    #[doc = "Component ID"]
22851    pub target_component: u8,
22852    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
22853    pub gimbal_device_id: u8,
22854}
22855impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22856    pub const ENCODED_LEN: usize = 23usize;
22857    pub const DEFAULT: Self = Self {
22858        flags: GimbalManagerFlags::DEFAULT,
22859        pitch: 0.0_f32,
22860        yaw: 0.0_f32,
22861        pitch_rate: 0.0_f32,
22862        yaw_rate: 0.0_f32,
22863        target_system: 0_u8,
22864        target_component: 0_u8,
22865        gimbal_device_id: 0_u8,
22866    };
22867    #[cfg(feature = "arbitrary")]
22868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22869        use arbitrary::{Arbitrary, Unstructured};
22870        let mut buf = [0u8; 1024];
22871        rng.fill_bytes(&mut buf);
22872        let mut unstructured = Unstructured::new(&buf);
22873        Self::arbitrary(&mut unstructured).unwrap_or_default()
22874    }
22875}
22876impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22877    fn default() -> Self {
22878        Self::DEFAULT.clone()
22879    }
22880}
22881impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
22882    type Message = MavMessage;
22883    const ID: u32 = 287u32;
22884    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
22885    const EXTRA_CRC: u8 = 1u8;
22886    const ENCODED_LEN: usize = 23usize;
22887    fn deser(
22888        _version: MavlinkVersion,
22889        __input: &[u8],
22890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22891        let avail_len = __input.len();
22892        let mut payload_buf = [0; Self::ENCODED_LEN];
22893        let mut buf = if avail_len < Self::ENCODED_LEN {
22894            payload_buf[0..avail_len].copy_from_slice(__input);
22895            Bytes::new(&payload_buf)
22896        } else {
22897            Bytes::new(__input)
22898        };
22899        let mut __struct = Self::default();
22900        let tmp = buf.get_u32_le();
22901        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
22902            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
22903                flag_type: "GimbalManagerFlags",
22904                value: tmp as u32,
22905            })?;
22906        __struct.pitch = buf.get_f32_le();
22907        __struct.yaw = buf.get_f32_le();
22908        __struct.pitch_rate = buf.get_f32_le();
22909        __struct.yaw_rate = buf.get_f32_le();
22910        __struct.target_system = buf.get_u8();
22911        __struct.target_component = buf.get_u8();
22912        __struct.gimbal_device_id = buf.get_u8();
22913        Ok(__struct)
22914    }
22915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22916        let mut __tmp = BytesMut::new(bytes);
22917        #[allow(clippy::absurd_extreme_comparisons)]
22918        #[allow(unused_comparisons)]
22919        if __tmp.remaining() < Self::ENCODED_LEN {
22920            panic!(
22921                "buffer is too small (need {} bytes, but got {})",
22922                Self::ENCODED_LEN,
22923                __tmp.remaining(),
22924            )
22925        }
22926        __tmp.put_u32_le(self.flags.bits());
22927        __tmp.put_f32_le(self.pitch);
22928        __tmp.put_f32_le(self.yaw);
22929        __tmp.put_f32_le(self.pitch_rate);
22930        __tmp.put_f32_le(self.yaw_rate);
22931        __tmp.put_u8(self.target_system);
22932        __tmp.put_u8(self.target_component);
22933        __tmp.put_u8(self.gimbal_device_id);
22934        if matches!(version, MavlinkVersion::V2) {
22935            let len = __tmp.len();
22936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22937        } else {
22938            __tmp.len()
22939        }
22940    }
22941}
22942#[doc = "id: 299"]
22943#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
22944#[derive(Debug, Clone, PartialEq)]
22945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22947pub struct WIFI_CONFIG_AP_DATA {
22948    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
22949    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22950    pub ssid: [u8; 32],
22951    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
22952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22953    pub password: [u8; 64],
22954    #[doc = "WiFi Mode."]
22955    #[cfg_attr(feature = "serde", serde(default))]
22956    pub mode: WifiConfigApMode,
22957    #[doc = "Message acceptance response (sent back to GS)."]
22958    #[cfg_attr(feature = "serde", serde(default))]
22959    pub response: WifiConfigApResponse,
22960}
22961impl WIFI_CONFIG_AP_DATA {
22962    pub const ENCODED_LEN: usize = 98usize;
22963    pub const DEFAULT: Self = Self {
22964        ssid: [0_u8; 32usize],
22965        password: [0_u8; 64usize],
22966        mode: WifiConfigApMode::DEFAULT,
22967        response: WifiConfigApResponse::DEFAULT,
22968    };
22969    #[cfg(feature = "arbitrary")]
22970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22971        use arbitrary::{Arbitrary, Unstructured};
22972        let mut buf = [0u8; 1024];
22973        rng.fill_bytes(&mut buf);
22974        let mut unstructured = Unstructured::new(&buf);
22975        Self::arbitrary(&mut unstructured).unwrap_or_default()
22976    }
22977}
22978impl Default for WIFI_CONFIG_AP_DATA {
22979    fn default() -> Self {
22980        Self::DEFAULT.clone()
22981    }
22982}
22983impl MessageData for WIFI_CONFIG_AP_DATA {
22984    type Message = MavMessage;
22985    const ID: u32 = 299u32;
22986    const NAME: &'static str = "WIFI_CONFIG_AP";
22987    const EXTRA_CRC: u8 = 19u8;
22988    const ENCODED_LEN: usize = 98usize;
22989    fn deser(
22990        _version: MavlinkVersion,
22991        __input: &[u8],
22992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22993        let avail_len = __input.len();
22994        let mut payload_buf = [0; Self::ENCODED_LEN];
22995        let mut buf = if avail_len < Self::ENCODED_LEN {
22996            payload_buf[0..avail_len].copy_from_slice(__input);
22997            Bytes::new(&payload_buf)
22998        } else {
22999            Bytes::new(__input)
23000        };
23001        let mut __struct = Self::default();
23002        for v in &mut __struct.ssid {
23003            let val = buf.get_u8();
23004            *v = val;
23005        }
23006        for v in &mut __struct.password {
23007            let val = buf.get_u8();
23008            *v = val;
23009        }
23010        let tmp = buf.get_i8();
23011        __struct.mode =
23012            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23013                enum_type: "WifiConfigApMode",
23014                value: tmp as u32,
23015            })?;
23016        let tmp = buf.get_i8();
23017        __struct.response =
23018            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23019                enum_type: "WifiConfigApResponse",
23020                value: tmp as u32,
23021            })?;
23022        Ok(__struct)
23023    }
23024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23025        let mut __tmp = BytesMut::new(bytes);
23026        #[allow(clippy::absurd_extreme_comparisons)]
23027        #[allow(unused_comparisons)]
23028        if __tmp.remaining() < Self::ENCODED_LEN {
23029            panic!(
23030                "buffer is too small (need {} bytes, but got {})",
23031                Self::ENCODED_LEN,
23032                __tmp.remaining(),
23033            )
23034        }
23035        for val in &self.ssid {
23036            __tmp.put_u8(*val);
23037        }
23038        for val in &self.password {
23039            __tmp.put_u8(*val);
23040        }
23041        __tmp.put_i8(self.mode as i8);
23042        __tmp.put_i8(self.response as i8);
23043        if matches!(version, MavlinkVersion::V2) {
23044            let len = __tmp.len();
23045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23046        } else {
23047            __tmp.len()
23048        }
23049    }
23050}
23051#[doc = "id: 42"]
23052#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
23053#[derive(Debug, Clone, PartialEq)]
23054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23056pub struct MISSION_CURRENT_DATA {
23057    #[doc = "Sequence"]
23058    pub seq: u16,
23059    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
23060    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23061    pub total: u16,
23062    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
23063    #[cfg_attr(feature = "serde", serde(default))]
23064    pub mission_state: MissionState,
23065    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
23066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23067    pub mission_mode: u8,
23068    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
23069    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23070    pub mission_id: u32,
23071    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
23072    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23073    pub fence_id: u32,
23074    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
23075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23076    pub rally_points_id: u32,
23077}
23078impl MISSION_CURRENT_DATA {
23079    pub const ENCODED_LEN: usize = 18usize;
23080    pub const DEFAULT: Self = Self {
23081        seq: 0_u16,
23082        total: 0_u16,
23083        mission_state: MissionState::DEFAULT,
23084        mission_mode: 0_u8,
23085        mission_id: 0_u32,
23086        fence_id: 0_u32,
23087        rally_points_id: 0_u32,
23088    };
23089    #[cfg(feature = "arbitrary")]
23090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23091        use arbitrary::{Arbitrary, Unstructured};
23092        let mut buf = [0u8; 1024];
23093        rng.fill_bytes(&mut buf);
23094        let mut unstructured = Unstructured::new(&buf);
23095        Self::arbitrary(&mut unstructured).unwrap_or_default()
23096    }
23097}
23098impl Default for MISSION_CURRENT_DATA {
23099    fn default() -> Self {
23100        Self::DEFAULT.clone()
23101    }
23102}
23103impl MessageData for MISSION_CURRENT_DATA {
23104    type Message = MavMessage;
23105    const ID: u32 = 42u32;
23106    const NAME: &'static str = "MISSION_CURRENT";
23107    const EXTRA_CRC: u8 = 28u8;
23108    const ENCODED_LEN: usize = 18usize;
23109    fn deser(
23110        _version: MavlinkVersion,
23111        __input: &[u8],
23112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23113        let avail_len = __input.len();
23114        let mut payload_buf = [0; Self::ENCODED_LEN];
23115        let mut buf = if avail_len < Self::ENCODED_LEN {
23116            payload_buf[0..avail_len].copy_from_slice(__input);
23117            Bytes::new(&payload_buf)
23118        } else {
23119            Bytes::new(__input)
23120        };
23121        let mut __struct = Self::default();
23122        __struct.seq = buf.get_u16_le();
23123        __struct.total = buf.get_u16_le();
23124        let tmp = buf.get_u8();
23125        __struct.mission_state =
23126            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23127                enum_type: "MissionState",
23128                value: tmp as u32,
23129            })?;
23130        __struct.mission_mode = buf.get_u8();
23131        __struct.mission_id = buf.get_u32_le();
23132        __struct.fence_id = buf.get_u32_le();
23133        __struct.rally_points_id = buf.get_u32_le();
23134        Ok(__struct)
23135    }
23136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23137        let mut __tmp = BytesMut::new(bytes);
23138        #[allow(clippy::absurd_extreme_comparisons)]
23139        #[allow(unused_comparisons)]
23140        if __tmp.remaining() < Self::ENCODED_LEN {
23141            panic!(
23142                "buffer is too small (need {} bytes, but got {})",
23143                Self::ENCODED_LEN,
23144                __tmp.remaining(),
23145            )
23146        }
23147        __tmp.put_u16_le(self.seq);
23148        __tmp.put_u16_le(self.total);
23149        __tmp.put_u8(self.mission_state as u8);
23150        __tmp.put_u8(self.mission_mode);
23151        __tmp.put_u32_le(self.mission_id);
23152        __tmp.put_u32_le(self.fence_id);
23153        __tmp.put_u32_le(self.rally_points_id);
23154        if matches!(version, MavlinkVersion::V2) {
23155            let len = __tmp.len();
23156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23157        } else {
23158            __tmp.len()
23159        }
23160    }
23161}
23162#[doc = "id: 412"]
23163#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
23164#[derive(Debug, Clone, PartialEq)]
23165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23167pub struct REQUEST_EVENT_DATA {
23168    #[doc = "First sequence number of the requested event."]
23169    pub first_sequence: u16,
23170    #[doc = "Last sequence number of the requested event."]
23171    pub last_sequence: u16,
23172    #[doc = "System ID"]
23173    pub target_system: u8,
23174    #[doc = "Component ID"]
23175    pub target_component: u8,
23176}
23177impl REQUEST_EVENT_DATA {
23178    pub const ENCODED_LEN: usize = 6usize;
23179    pub const DEFAULT: Self = Self {
23180        first_sequence: 0_u16,
23181        last_sequence: 0_u16,
23182        target_system: 0_u8,
23183        target_component: 0_u8,
23184    };
23185    #[cfg(feature = "arbitrary")]
23186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23187        use arbitrary::{Arbitrary, Unstructured};
23188        let mut buf = [0u8; 1024];
23189        rng.fill_bytes(&mut buf);
23190        let mut unstructured = Unstructured::new(&buf);
23191        Self::arbitrary(&mut unstructured).unwrap_or_default()
23192    }
23193}
23194impl Default for REQUEST_EVENT_DATA {
23195    fn default() -> Self {
23196        Self::DEFAULT.clone()
23197    }
23198}
23199impl MessageData for REQUEST_EVENT_DATA {
23200    type Message = MavMessage;
23201    const ID: u32 = 412u32;
23202    const NAME: &'static str = "REQUEST_EVENT";
23203    const EXTRA_CRC: u8 = 33u8;
23204    const ENCODED_LEN: usize = 6usize;
23205    fn deser(
23206        _version: MavlinkVersion,
23207        __input: &[u8],
23208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23209        let avail_len = __input.len();
23210        let mut payload_buf = [0; Self::ENCODED_LEN];
23211        let mut buf = if avail_len < Self::ENCODED_LEN {
23212            payload_buf[0..avail_len].copy_from_slice(__input);
23213            Bytes::new(&payload_buf)
23214        } else {
23215            Bytes::new(__input)
23216        };
23217        let mut __struct = Self::default();
23218        __struct.first_sequence = buf.get_u16_le();
23219        __struct.last_sequence = buf.get_u16_le();
23220        __struct.target_system = buf.get_u8();
23221        __struct.target_component = buf.get_u8();
23222        Ok(__struct)
23223    }
23224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23225        let mut __tmp = BytesMut::new(bytes);
23226        #[allow(clippy::absurd_extreme_comparisons)]
23227        #[allow(unused_comparisons)]
23228        if __tmp.remaining() < Self::ENCODED_LEN {
23229            panic!(
23230                "buffer is too small (need {} bytes, but got {})",
23231                Self::ENCODED_LEN,
23232                __tmp.remaining(),
23233            )
23234        }
23235        __tmp.put_u16_le(self.first_sequence);
23236        __tmp.put_u16_le(self.last_sequence);
23237        __tmp.put_u8(self.target_system);
23238        __tmp.put_u8(self.target_component);
23239        if matches!(version, MavlinkVersion::V2) {
23240            let len = __tmp.len();
23241            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23242        } else {
23243            __tmp.len()
23244        }
23245    }
23246}
23247#[doc = "id: 149"]
23248#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
23249#[derive(Debug, Clone, PartialEq)]
23250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23252pub struct LANDING_TARGET_DATA {
23253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23254    pub time_usec: u64,
23255    #[doc = "X-axis angular offset of the target from the center of the image"]
23256    pub angle_x: f32,
23257    #[doc = "Y-axis angular offset of the target from the center of the image"]
23258    pub angle_y: f32,
23259    #[doc = "Distance to the target from the vehicle"]
23260    pub distance: f32,
23261    #[doc = "Size of target along x-axis"]
23262    pub size_x: f32,
23263    #[doc = "Size of target along y-axis"]
23264    pub size_y: f32,
23265    #[doc = "The ID of the target if multiple targets are present"]
23266    pub target_num: u8,
23267    #[doc = "Coordinate frame used for following fields."]
23268    pub frame: MavFrame,
23269    #[doc = "X Position of the landing target in MAV_FRAME"]
23270    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23271    pub x: f32,
23272    #[doc = "Y Position of the landing target in MAV_FRAME"]
23273    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23274    pub y: f32,
23275    #[doc = "Z Position of the landing target in MAV_FRAME"]
23276    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23277    pub z: f32,
23278    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
23279    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23281    pub q: [f32; 4],
23282    #[doc = "Type of landing target"]
23283    #[cfg_attr(feature = "serde", serde(default))]
23284    pub mavtype: LandingTargetType,
23285    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
23286    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23287    pub position_valid: u8,
23288}
23289impl LANDING_TARGET_DATA {
23290    pub const ENCODED_LEN: usize = 60usize;
23291    pub const DEFAULT: Self = Self {
23292        time_usec: 0_u64,
23293        angle_x: 0.0_f32,
23294        angle_y: 0.0_f32,
23295        distance: 0.0_f32,
23296        size_x: 0.0_f32,
23297        size_y: 0.0_f32,
23298        target_num: 0_u8,
23299        frame: MavFrame::DEFAULT,
23300        x: 0.0_f32,
23301        y: 0.0_f32,
23302        z: 0.0_f32,
23303        q: [0.0_f32; 4usize],
23304        mavtype: LandingTargetType::DEFAULT,
23305        position_valid: 0_u8,
23306    };
23307    #[cfg(feature = "arbitrary")]
23308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23309        use arbitrary::{Arbitrary, Unstructured};
23310        let mut buf = [0u8; 1024];
23311        rng.fill_bytes(&mut buf);
23312        let mut unstructured = Unstructured::new(&buf);
23313        Self::arbitrary(&mut unstructured).unwrap_or_default()
23314    }
23315}
23316impl Default for LANDING_TARGET_DATA {
23317    fn default() -> Self {
23318        Self::DEFAULT.clone()
23319    }
23320}
23321impl MessageData for LANDING_TARGET_DATA {
23322    type Message = MavMessage;
23323    const ID: u32 = 149u32;
23324    const NAME: &'static str = "LANDING_TARGET";
23325    const EXTRA_CRC: u8 = 200u8;
23326    const ENCODED_LEN: usize = 60usize;
23327    fn deser(
23328        _version: MavlinkVersion,
23329        __input: &[u8],
23330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23331        let avail_len = __input.len();
23332        let mut payload_buf = [0; Self::ENCODED_LEN];
23333        let mut buf = if avail_len < Self::ENCODED_LEN {
23334            payload_buf[0..avail_len].copy_from_slice(__input);
23335            Bytes::new(&payload_buf)
23336        } else {
23337            Bytes::new(__input)
23338        };
23339        let mut __struct = Self::default();
23340        __struct.time_usec = buf.get_u64_le();
23341        __struct.angle_x = buf.get_f32_le();
23342        __struct.angle_y = buf.get_f32_le();
23343        __struct.distance = buf.get_f32_le();
23344        __struct.size_x = buf.get_f32_le();
23345        __struct.size_y = buf.get_f32_le();
23346        __struct.target_num = buf.get_u8();
23347        let tmp = buf.get_u8();
23348        __struct.frame =
23349            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23350                enum_type: "MavFrame",
23351                value: tmp as u32,
23352            })?;
23353        __struct.x = buf.get_f32_le();
23354        __struct.y = buf.get_f32_le();
23355        __struct.z = buf.get_f32_le();
23356        for v in &mut __struct.q {
23357            let val = buf.get_f32_le();
23358            *v = val;
23359        }
23360        let tmp = buf.get_u8();
23361        __struct.mavtype =
23362            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23363                enum_type: "LandingTargetType",
23364                value: tmp as u32,
23365            })?;
23366        __struct.position_valid = buf.get_u8();
23367        Ok(__struct)
23368    }
23369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23370        let mut __tmp = BytesMut::new(bytes);
23371        #[allow(clippy::absurd_extreme_comparisons)]
23372        #[allow(unused_comparisons)]
23373        if __tmp.remaining() < Self::ENCODED_LEN {
23374            panic!(
23375                "buffer is too small (need {} bytes, but got {})",
23376                Self::ENCODED_LEN,
23377                __tmp.remaining(),
23378            )
23379        }
23380        __tmp.put_u64_le(self.time_usec);
23381        __tmp.put_f32_le(self.angle_x);
23382        __tmp.put_f32_le(self.angle_y);
23383        __tmp.put_f32_le(self.distance);
23384        __tmp.put_f32_le(self.size_x);
23385        __tmp.put_f32_le(self.size_y);
23386        __tmp.put_u8(self.target_num);
23387        __tmp.put_u8(self.frame as u8);
23388        __tmp.put_f32_le(self.x);
23389        __tmp.put_f32_le(self.y);
23390        __tmp.put_f32_le(self.z);
23391        for val in &self.q {
23392            __tmp.put_f32_le(*val);
23393        }
23394        __tmp.put_u8(self.mavtype as u8);
23395        __tmp.put_u8(self.position_valid);
23396        if matches!(version, MavlinkVersion::V2) {
23397            let len = __tmp.len();
23398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23399        } else {
23400            __tmp.len()
23401        }
23402    }
23403}
23404#[doc = "id: 124"]
23405#[doc = "Second GPS data."]
23406#[derive(Debug, Clone, PartialEq)]
23407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23409pub struct GPS2_RAW_DATA {
23410    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23411    pub time_usec: u64,
23412    #[doc = "Latitude (WGS84)"]
23413    pub lat: i32,
23414    #[doc = "Longitude (WGS84)"]
23415    pub lon: i32,
23416    #[doc = "Altitude (MSL). Positive for up."]
23417    pub alt: i32,
23418    #[doc = "Age of DGPS info"]
23419    pub dgps_age: u32,
23420    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
23421    pub eph: u16,
23422    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
23423    pub epv: u16,
23424    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
23425    pub vel: u16,
23426    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
23427    pub cog: u16,
23428    #[doc = "GPS fix type."]
23429    pub fix_type: GpsFixType,
23430    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
23431    pub satellites_visible: u8,
23432    #[doc = "Number of DGPS satellites"]
23433    pub dgps_numch: u8,
23434    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
23435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23436    pub yaw: u16,
23437    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
23438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23439    pub alt_ellipsoid: i32,
23440    #[doc = "Position uncertainty."]
23441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23442    pub h_acc: u32,
23443    #[doc = "Altitude uncertainty."]
23444    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23445    pub v_acc: u32,
23446    #[doc = "Speed uncertainty."]
23447    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23448    pub vel_acc: u32,
23449    #[doc = "Heading / track uncertainty"]
23450    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23451    pub hdg_acc: u32,
23452}
23453impl GPS2_RAW_DATA {
23454    pub const ENCODED_LEN: usize = 57usize;
23455    pub const DEFAULT: Self = Self {
23456        time_usec: 0_u64,
23457        lat: 0_i32,
23458        lon: 0_i32,
23459        alt: 0_i32,
23460        dgps_age: 0_u32,
23461        eph: 0_u16,
23462        epv: 0_u16,
23463        vel: 0_u16,
23464        cog: 0_u16,
23465        fix_type: GpsFixType::DEFAULT,
23466        satellites_visible: 0_u8,
23467        dgps_numch: 0_u8,
23468        yaw: 0_u16,
23469        alt_ellipsoid: 0_i32,
23470        h_acc: 0_u32,
23471        v_acc: 0_u32,
23472        vel_acc: 0_u32,
23473        hdg_acc: 0_u32,
23474    };
23475    #[cfg(feature = "arbitrary")]
23476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23477        use arbitrary::{Arbitrary, Unstructured};
23478        let mut buf = [0u8; 1024];
23479        rng.fill_bytes(&mut buf);
23480        let mut unstructured = Unstructured::new(&buf);
23481        Self::arbitrary(&mut unstructured).unwrap_or_default()
23482    }
23483}
23484impl Default for GPS2_RAW_DATA {
23485    fn default() -> Self {
23486        Self::DEFAULT.clone()
23487    }
23488}
23489impl MessageData for GPS2_RAW_DATA {
23490    type Message = MavMessage;
23491    const ID: u32 = 124u32;
23492    const NAME: &'static str = "GPS2_RAW";
23493    const EXTRA_CRC: u8 = 87u8;
23494    const ENCODED_LEN: usize = 57usize;
23495    fn deser(
23496        _version: MavlinkVersion,
23497        __input: &[u8],
23498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23499        let avail_len = __input.len();
23500        let mut payload_buf = [0; Self::ENCODED_LEN];
23501        let mut buf = if avail_len < Self::ENCODED_LEN {
23502            payload_buf[0..avail_len].copy_from_slice(__input);
23503            Bytes::new(&payload_buf)
23504        } else {
23505            Bytes::new(__input)
23506        };
23507        let mut __struct = Self::default();
23508        __struct.time_usec = buf.get_u64_le();
23509        __struct.lat = buf.get_i32_le();
23510        __struct.lon = buf.get_i32_le();
23511        __struct.alt = buf.get_i32_le();
23512        __struct.dgps_age = buf.get_u32_le();
23513        __struct.eph = buf.get_u16_le();
23514        __struct.epv = buf.get_u16_le();
23515        __struct.vel = buf.get_u16_le();
23516        __struct.cog = buf.get_u16_le();
23517        let tmp = buf.get_u8();
23518        __struct.fix_type =
23519            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23520                enum_type: "GpsFixType",
23521                value: tmp as u32,
23522            })?;
23523        __struct.satellites_visible = buf.get_u8();
23524        __struct.dgps_numch = buf.get_u8();
23525        __struct.yaw = buf.get_u16_le();
23526        __struct.alt_ellipsoid = buf.get_i32_le();
23527        __struct.h_acc = buf.get_u32_le();
23528        __struct.v_acc = buf.get_u32_le();
23529        __struct.vel_acc = buf.get_u32_le();
23530        __struct.hdg_acc = buf.get_u32_le();
23531        Ok(__struct)
23532    }
23533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23534        let mut __tmp = BytesMut::new(bytes);
23535        #[allow(clippy::absurd_extreme_comparisons)]
23536        #[allow(unused_comparisons)]
23537        if __tmp.remaining() < Self::ENCODED_LEN {
23538            panic!(
23539                "buffer is too small (need {} bytes, but got {})",
23540                Self::ENCODED_LEN,
23541                __tmp.remaining(),
23542            )
23543        }
23544        __tmp.put_u64_le(self.time_usec);
23545        __tmp.put_i32_le(self.lat);
23546        __tmp.put_i32_le(self.lon);
23547        __tmp.put_i32_le(self.alt);
23548        __tmp.put_u32_le(self.dgps_age);
23549        __tmp.put_u16_le(self.eph);
23550        __tmp.put_u16_le(self.epv);
23551        __tmp.put_u16_le(self.vel);
23552        __tmp.put_u16_le(self.cog);
23553        __tmp.put_u8(self.fix_type as u8);
23554        __tmp.put_u8(self.satellites_visible);
23555        __tmp.put_u8(self.dgps_numch);
23556        __tmp.put_u16_le(self.yaw);
23557        __tmp.put_i32_le(self.alt_ellipsoid);
23558        __tmp.put_u32_le(self.h_acc);
23559        __tmp.put_u32_le(self.v_acc);
23560        __tmp.put_u32_le(self.vel_acc);
23561        __tmp.put_u32_le(self.hdg_acc);
23562        if matches!(version, MavlinkVersion::V2) {
23563            let len = __tmp.len();
23564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23565        } else {
23566            __tmp.len()
23567        }
23568    }
23569}
23570#[doc = "id: 400"]
23571#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
23572#[derive(Debug, Clone, PartialEq)]
23573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23575pub struct PLAY_TUNE_V2_DATA {
23576    #[doc = "Tune format"]
23577    pub format: TuneFormat,
23578    #[doc = "System ID"]
23579    pub target_system: u8,
23580    #[doc = "Component ID"]
23581    pub target_component: u8,
23582    #[doc = "Tune definition as a NULL-terminated string."]
23583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23584    pub tune: [u8; 248],
23585}
23586impl PLAY_TUNE_V2_DATA {
23587    pub const ENCODED_LEN: usize = 254usize;
23588    pub const DEFAULT: Self = Self {
23589        format: TuneFormat::DEFAULT,
23590        target_system: 0_u8,
23591        target_component: 0_u8,
23592        tune: [0_u8; 248usize],
23593    };
23594    #[cfg(feature = "arbitrary")]
23595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23596        use arbitrary::{Arbitrary, Unstructured};
23597        let mut buf = [0u8; 1024];
23598        rng.fill_bytes(&mut buf);
23599        let mut unstructured = Unstructured::new(&buf);
23600        Self::arbitrary(&mut unstructured).unwrap_or_default()
23601    }
23602}
23603impl Default for PLAY_TUNE_V2_DATA {
23604    fn default() -> Self {
23605        Self::DEFAULT.clone()
23606    }
23607}
23608impl MessageData for PLAY_TUNE_V2_DATA {
23609    type Message = MavMessage;
23610    const ID: u32 = 400u32;
23611    const NAME: &'static str = "PLAY_TUNE_V2";
23612    const EXTRA_CRC: u8 = 110u8;
23613    const ENCODED_LEN: usize = 254usize;
23614    fn deser(
23615        _version: MavlinkVersion,
23616        __input: &[u8],
23617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23618        let avail_len = __input.len();
23619        let mut payload_buf = [0; Self::ENCODED_LEN];
23620        let mut buf = if avail_len < Self::ENCODED_LEN {
23621            payload_buf[0..avail_len].copy_from_slice(__input);
23622            Bytes::new(&payload_buf)
23623        } else {
23624            Bytes::new(__input)
23625        };
23626        let mut __struct = Self::default();
23627        let tmp = buf.get_u32_le();
23628        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
23629            ::mavlink_core::error::ParserError::InvalidEnum {
23630                enum_type: "TuneFormat",
23631                value: tmp as u32,
23632            },
23633        )?;
23634        __struct.target_system = buf.get_u8();
23635        __struct.target_component = buf.get_u8();
23636        for v in &mut __struct.tune {
23637            let val = buf.get_u8();
23638            *v = val;
23639        }
23640        Ok(__struct)
23641    }
23642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23643        let mut __tmp = BytesMut::new(bytes);
23644        #[allow(clippy::absurd_extreme_comparisons)]
23645        #[allow(unused_comparisons)]
23646        if __tmp.remaining() < Self::ENCODED_LEN {
23647            panic!(
23648                "buffer is too small (need {} bytes, but got {})",
23649                Self::ENCODED_LEN,
23650                __tmp.remaining(),
23651            )
23652        }
23653        __tmp.put_u32_le(self.format as u32);
23654        __tmp.put_u8(self.target_system);
23655        __tmp.put_u8(self.target_component);
23656        for val in &self.tune {
23657            __tmp.put_u8(*val);
23658        }
23659        if matches!(version, MavlinkVersion::V2) {
23660            let len = __tmp.len();
23661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23662        } else {
23663            __tmp.len()
23664        }
23665    }
23666}
23667#[doc = "id: 5"]
23668#[doc = "Request to control this MAV."]
23669#[derive(Debug, Clone, PartialEq)]
23670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23672pub struct CHANGE_OPERATOR_CONTROL_DATA {
23673    #[doc = "System the GCS requests control for"]
23674    pub target_system: u8,
23675    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
23676    pub control_request: u8,
23677    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
23678    pub version: u8,
23679    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
23680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23681    pub passkey: [u8; 25],
23682}
23683impl CHANGE_OPERATOR_CONTROL_DATA {
23684    pub const ENCODED_LEN: usize = 28usize;
23685    pub const DEFAULT: Self = Self {
23686        target_system: 0_u8,
23687        control_request: 0_u8,
23688        version: 0_u8,
23689        passkey: [0_u8; 25usize],
23690    };
23691    #[cfg(feature = "arbitrary")]
23692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23693        use arbitrary::{Arbitrary, Unstructured};
23694        let mut buf = [0u8; 1024];
23695        rng.fill_bytes(&mut buf);
23696        let mut unstructured = Unstructured::new(&buf);
23697        Self::arbitrary(&mut unstructured).unwrap_or_default()
23698    }
23699}
23700impl Default for CHANGE_OPERATOR_CONTROL_DATA {
23701    fn default() -> Self {
23702        Self::DEFAULT.clone()
23703    }
23704}
23705impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
23706    type Message = MavMessage;
23707    const ID: u32 = 5u32;
23708    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
23709    const EXTRA_CRC: u8 = 217u8;
23710    const ENCODED_LEN: usize = 28usize;
23711    fn deser(
23712        _version: MavlinkVersion,
23713        __input: &[u8],
23714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23715        let avail_len = __input.len();
23716        let mut payload_buf = [0; Self::ENCODED_LEN];
23717        let mut buf = if avail_len < Self::ENCODED_LEN {
23718            payload_buf[0..avail_len].copy_from_slice(__input);
23719            Bytes::new(&payload_buf)
23720        } else {
23721            Bytes::new(__input)
23722        };
23723        let mut __struct = Self::default();
23724        __struct.target_system = buf.get_u8();
23725        __struct.control_request = buf.get_u8();
23726        __struct.version = buf.get_u8();
23727        for v in &mut __struct.passkey {
23728            let val = buf.get_u8();
23729            *v = val;
23730        }
23731        Ok(__struct)
23732    }
23733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23734        let mut __tmp = BytesMut::new(bytes);
23735        #[allow(clippy::absurd_extreme_comparisons)]
23736        #[allow(unused_comparisons)]
23737        if __tmp.remaining() < Self::ENCODED_LEN {
23738            panic!(
23739                "buffer is too small (need {} bytes, but got {})",
23740                Self::ENCODED_LEN,
23741                __tmp.remaining(),
23742            )
23743        }
23744        __tmp.put_u8(self.target_system);
23745        __tmp.put_u8(self.control_request);
23746        __tmp.put_u8(self.version);
23747        for val in &self.passkey {
23748            __tmp.put_u8(*val);
23749        }
23750        if matches!(version, MavlinkVersion::V2) {
23751            let len = __tmp.len();
23752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23753        } else {
23754            __tmp.len()
23755        }
23756    }
23757}
23758#[doc = "id: 286"]
23759#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
23760#[derive(Debug, Clone, PartialEq)]
23761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23763pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
23764    #[doc = "Timestamp (time since system boot)."]
23765    pub time_boot_us: u64,
23766    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
23767    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23768    pub q: [f32; 4],
23769    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
23770    pub q_estimated_delay_us: u32,
23771    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
23772    pub vx: f32,
23773    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
23774    pub vy: f32,
23775    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
23776    pub vz: f32,
23777    #[doc = "Estimated delay of the speed data. 0 if unknown."]
23778    pub v_estimated_delay_us: u32,
23779    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
23780    pub feed_forward_angular_velocity_z: f32,
23781    #[doc = "Bitmap indicating which estimator outputs are valid."]
23782    pub estimator_status: EstimatorStatusFlags,
23783    #[doc = "System ID"]
23784    pub target_system: u8,
23785    #[doc = "Component ID"]
23786    pub target_component: u8,
23787    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
23788    pub landed_state: MavLandedState,
23789    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
23790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23791    pub angular_velocity_z: f32,
23792}
23793impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
23794    pub const ENCODED_LEN: usize = 57usize;
23795    pub const DEFAULT: Self = Self {
23796        time_boot_us: 0_u64,
23797        q: [0.0_f32; 4usize],
23798        q_estimated_delay_us: 0_u32,
23799        vx: 0.0_f32,
23800        vy: 0.0_f32,
23801        vz: 0.0_f32,
23802        v_estimated_delay_us: 0_u32,
23803        feed_forward_angular_velocity_z: 0.0_f32,
23804        estimator_status: EstimatorStatusFlags::DEFAULT,
23805        target_system: 0_u8,
23806        target_component: 0_u8,
23807        landed_state: MavLandedState::DEFAULT,
23808        angular_velocity_z: 0.0_f32,
23809    };
23810    #[cfg(feature = "arbitrary")]
23811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23812        use arbitrary::{Arbitrary, Unstructured};
23813        let mut buf = [0u8; 1024];
23814        rng.fill_bytes(&mut buf);
23815        let mut unstructured = Unstructured::new(&buf);
23816        Self::arbitrary(&mut unstructured).unwrap_or_default()
23817    }
23818}
23819impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
23820    fn default() -> Self {
23821        Self::DEFAULT.clone()
23822    }
23823}
23824impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
23825    type Message = MavMessage;
23826    const ID: u32 = 286u32;
23827    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
23828    const EXTRA_CRC: u8 = 210u8;
23829    const ENCODED_LEN: usize = 57usize;
23830    fn deser(
23831        _version: MavlinkVersion,
23832        __input: &[u8],
23833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23834        let avail_len = __input.len();
23835        let mut payload_buf = [0; Self::ENCODED_LEN];
23836        let mut buf = if avail_len < Self::ENCODED_LEN {
23837            payload_buf[0..avail_len].copy_from_slice(__input);
23838            Bytes::new(&payload_buf)
23839        } else {
23840            Bytes::new(__input)
23841        };
23842        let mut __struct = Self::default();
23843        __struct.time_boot_us = buf.get_u64_le();
23844        for v in &mut __struct.q {
23845            let val = buf.get_f32_le();
23846            *v = val;
23847        }
23848        __struct.q_estimated_delay_us = buf.get_u32_le();
23849        __struct.vx = buf.get_f32_le();
23850        __struct.vy = buf.get_f32_le();
23851        __struct.vz = buf.get_f32_le();
23852        __struct.v_estimated_delay_us = buf.get_u32_le();
23853        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
23854        let tmp = buf.get_u16_le();
23855        __struct.estimator_status = EstimatorStatusFlags::from_bits(
23856            tmp & EstimatorStatusFlags::all().bits(),
23857        )
23858        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23859            flag_type: "EstimatorStatusFlags",
23860            value: tmp as u32,
23861        })?;
23862        __struct.target_system = buf.get_u8();
23863        __struct.target_component = buf.get_u8();
23864        let tmp = buf.get_u8();
23865        __struct.landed_state =
23866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23867                enum_type: "MavLandedState",
23868                value: tmp as u32,
23869            })?;
23870        __struct.angular_velocity_z = buf.get_f32_le();
23871        Ok(__struct)
23872    }
23873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23874        let mut __tmp = BytesMut::new(bytes);
23875        #[allow(clippy::absurd_extreme_comparisons)]
23876        #[allow(unused_comparisons)]
23877        if __tmp.remaining() < Self::ENCODED_LEN {
23878            panic!(
23879                "buffer is too small (need {} bytes, but got {})",
23880                Self::ENCODED_LEN,
23881                __tmp.remaining(),
23882            )
23883        }
23884        __tmp.put_u64_le(self.time_boot_us);
23885        for val in &self.q {
23886            __tmp.put_f32_le(*val);
23887        }
23888        __tmp.put_u32_le(self.q_estimated_delay_us);
23889        __tmp.put_f32_le(self.vx);
23890        __tmp.put_f32_le(self.vy);
23891        __tmp.put_f32_le(self.vz);
23892        __tmp.put_u32_le(self.v_estimated_delay_us);
23893        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
23894        __tmp.put_u16_le(self.estimator_status.bits());
23895        __tmp.put_u8(self.target_system);
23896        __tmp.put_u8(self.target_component);
23897        __tmp.put_u8(self.landed_state as u8);
23898        __tmp.put_f32_le(self.angular_velocity_z);
23899        if matches!(version, MavlinkVersion::V2) {
23900            let len = __tmp.len();
23901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23902        } else {
23903            __tmp.len()
23904        }
23905    }
23906}
23907#[doc = "id: 6"]
23908#[doc = "Accept / deny control of this MAV."]
23909#[derive(Debug, Clone, PartialEq)]
23910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23912pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
23913    #[doc = "ID of the GCS this message"]
23914    pub gcs_system_id: u8,
23915    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
23916    pub control_request: u8,
23917    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
23918    pub ack: u8,
23919}
23920impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
23921    pub const ENCODED_LEN: usize = 3usize;
23922    pub const DEFAULT: Self = Self {
23923        gcs_system_id: 0_u8,
23924        control_request: 0_u8,
23925        ack: 0_u8,
23926    };
23927    #[cfg(feature = "arbitrary")]
23928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23929        use arbitrary::{Arbitrary, Unstructured};
23930        let mut buf = [0u8; 1024];
23931        rng.fill_bytes(&mut buf);
23932        let mut unstructured = Unstructured::new(&buf);
23933        Self::arbitrary(&mut unstructured).unwrap_or_default()
23934    }
23935}
23936impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
23937    fn default() -> Self {
23938        Self::DEFAULT.clone()
23939    }
23940}
23941impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
23942    type Message = MavMessage;
23943    const ID: u32 = 6u32;
23944    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
23945    const EXTRA_CRC: u8 = 104u8;
23946    const ENCODED_LEN: usize = 3usize;
23947    fn deser(
23948        _version: MavlinkVersion,
23949        __input: &[u8],
23950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23951        let avail_len = __input.len();
23952        let mut payload_buf = [0; Self::ENCODED_LEN];
23953        let mut buf = if avail_len < Self::ENCODED_LEN {
23954            payload_buf[0..avail_len].copy_from_slice(__input);
23955            Bytes::new(&payload_buf)
23956        } else {
23957            Bytes::new(__input)
23958        };
23959        let mut __struct = Self::default();
23960        __struct.gcs_system_id = buf.get_u8();
23961        __struct.control_request = buf.get_u8();
23962        __struct.ack = buf.get_u8();
23963        Ok(__struct)
23964    }
23965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23966        let mut __tmp = BytesMut::new(bytes);
23967        #[allow(clippy::absurd_extreme_comparisons)]
23968        #[allow(unused_comparisons)]
23969        if __tmp.remaining() < Self::ENCODED_LEN {
23970            panic!(
23971                "buffer is too small (need {} bytes, but got {})",
23972                Self::ENCODED_LEN,
23973                __tmp.remaining(),
23974            )
23975        }
23976        __tmp.put_u8(self.gcs_system_id);
23977        __tmp.put_u8(self.control_request);
23978        __tmp.put_u8(self.ack);
23979        if matches!(version, MavlinkVersion::V2) {
23980            let len = __tmp.len();
23981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23982        } else {
23983            __tmp.len()
23984        }
23985    }
23986}
23987#[doc = "id: 221"]
23988#[doc = "Complete set of calibration parameters for the radio."]
23989#[derive(Debug, Clone, PartialEq)]
23990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23992pub struct RADIO_CALIBRATION_DATA {
23993    #[doc = "Aileron setpoints: left, center, right"]
23994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23995    pub aileron: [u16; 3],
23996    #[doc = "Elevator setpoints: nose down, center, nose up"]
23997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23998    pub elevator: [u16; 3],
23999    #[doc = "Rudder setpoints: nose left, center, nose right"]
24000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24001    pub rudder: [u16; 3],
24002    #[doc = "Tail gyro mode/gain setpoints: heading hold, rate mode"]
24003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24004    pub gyro: [u16; 2],
24005    #[doc = "Pitch curve setpoints (every 25%)"]
24006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24007    pub pitch: [u16; 5],
24008    #[doc = "Throttle curve setpoints (every 25%)"]
24009    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24010    pub throttle: [u16; 5],
24011}
24012impl RADIO_CALIBRATION_DATA {
24013    pub const ENCODED_LEN: usize = 42usize;
24014    pub const DEFAULT: Self = Self {
24015        aileron: [0_u16; 3usize],
24016        elevator: [0_u16; 3usize],
24017        rudder: [0_u16; 3usize],
24018        gyro: [0_u16; 2usize],
24019        pitch: [0_u16; 5usize],
24020        throttle: [0_u16; 5usize],
24021    };
24022    #[cfg(feature = "arbitrary")]
24023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24024        use arbitrary::{Arbitrary, Unstructured};
24025        let mut buf = [0u8; 1024];
24026        rng.fill_bytes(&mut buf);
24027        let mut unstructured = Unstructured::new(&buf);
24028        Self::arbitrary(&mut unstructured).unwrap_or_default()
24029    }
24030}
24031impl Default for RADIO_CALIBRATION_DATA {
24032    fn default() -> Self {
24033        Self::DEFAULT.clone()
24034    }
24035}
24036impl MessageData for RADIO_CALIBRATION_DATA {
24037    type Message = MavMessage;
24038    const ID: u32 = 221u32;
24039    const NAME: &'static str = "RADIO_CALIBRATION";
24040    const EXTRA_CRC: u8 = 71u8;
24041    const ENCODED_LEN: usize = 42usize;
24042    fn deser(
24043        _version: MavlinkVersion,
24044        __input: &[u8],
24045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24046        let avail_len = __input.len();
24047        let mut payload_buf = [0; Self::ENCODED_LEN];
24048        let mut buf = if avail_len < Self::ENCODED_LEN {
24049            payload_buf[0..avail_len].copy_from_slice(__input);
24050            Bytes::new(&payload_buf)
24051        } else {
24052            Bytes::new(__input)
24053        };
24054        let mut __struct = Self::default();
24055        for v in &mut __struct.aileron {
24056            let val = buf.get_u16_le();
24057            *v = val;
24058        }
24059        for v in &mut __struct.elevator {
24060            let val = buf.get_u16_le();
24061            *v = val;
24062        }
24063        for v in &mut __struct.rudder {
24064            let val = buf.get_u16_le();
24065            *v = val;
24066        }
24067        for v in &mut __struct.gyro {
24068            let val = buf.get_u16_le();
24069            *v = val;
24070        }
24071        for v in &mut __struct.pitch {
24072            let val = buf.get_u16_le();
24073            *v = val;
24074        }
24075        for v in &mut __struct.throttle {
24076            let val = buf.get_u16_le();
24077            *v = val;
24078        }
24079        Ok(__struct)
24080    }
24081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24082        let mut __tmp = BytesMut::new(bytes);
24083        #[allow(clippy::absurd_extreme_comparisons)]
24084        #[allow(unused_comparisons)]
24085        if __tmp.remaining() < Self::ENCODED_LEN {
24086            panic!(
24087                "buffer is too small (need {} bytes, but got {})",
24088                Self::ENCODED_LEN,
24089                __tmp.remaining(),
24090            )
24091        }
24092        for val in &self.aileron {
24093            __tmp.put_u16_le(*val);
24094        }
24095        for val in &self.elevator {
24096            __tmp.put_u16_le(*val);
24097        }
24098        for val in &self.rudder {
24099            __tmp.put_u16_le(*val);
24100        }
24101        for val in &self.gyro {
24102            __tmp.put_u16_le(*val);
24103        }
24104        for val in &self.pitch {
24105            __tmp.put_u16_le(*val);
24106        }
24107        for val in &self.throttle {
24108            __tmp.put_u16_le(*val);
24109        }
24110        if matches!(version, MavlinkVersion::V2) {
24111            let len = __tmp.len();
24112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24113        } else {
24114            __tmp.len()
24115        }
24116    }
24117}
24118#[doc = "id: 401"]
24119#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
24120#[derive(Debug, Clone, PartialEq)]
24121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24123pub struct SUPPORTED_TUNES_DATA {
24124    #[doc = "Bitfield of supported tune formats."]
24125    pub format: TuneFormat,
24126    #[doc = "System ID"]
24127    pub target_system: u8,
24128    #[doc = "Component ID"]
24129    pub target_component: u8,
24130}
24131impl SUPPORTED_TUNES_DATA {
24132    pub const ENCODED_LEN: usize = 6usize;
24133    pub const DEFAULT: Self = Self {
24134        format: TuneFormat::DEFAULT,
24135        target_system: 0_u8,
24136        target_component: 0_u8,
24137    };
24138    #[cfg(feature = "arbitrary")]
24139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24140        use arbitrary::{Arbitrary, Unstructured};
24141        let mut buf = [0u8; 1024];
24142        rng.fill_bytes(&mut buf);
24143        let mut unstructured = Unstructured::new(&buf);
24144        Self::arbitrary(&mut unstructured).unwrap_or_default()
24145    }
24146}
24147impl Default for SUPPORTED_TUNES_DATA {
24148    fn default() -> Self {
24149        Self::DEFAULT.clone()
24150    }
24151}
24152impl MessageData for SUPPORTED_TUNES_DATA {
24153    type Message = MavMessage;
24154    const ID: u32 = 401u32;
24155    const NAME: &'static str = "SUPPORTED_TUNES";
24156    const EXTRA_CRC: u8 = 183u8;
24157    const ENCODED_LEN: usize = 6usize;
24158    fn deser(
24159        _version: MavlinkVersion,
24160        __input: &[u8],
24161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24162        let avail_len = __input.len();
24163        let mut payload_buf = [0; Self::ENCODED_LEN];
24164        let mut buf = if avail_len < Self::ENCODED_LEN {
24165            payload_buf[0..avail_len].copy_from_slice(__input);
24166            Bytes::new(&payload_buf)
24167        } else {
24168            Bytes::new(__input)
24169        };
24170        let mut __struct = Self::default();
24171        let tmp = buf.get_u32_le();
24172        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24173            ::mavlink_core::error::ParserError::InvalidEnum {
24174                enum_type: "TuneFormat",
24175                value: tmp as u32,
24176            },
24177        )?;
24178        __struct.target_system = buf.get_u8();
24179        __struct.target_component = buf.get_u8();
24180        Ok(__struct)
24181    }
24182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24183        let mut __tmp = BytesMut::new(bytes);
24184        #[allow(clippy::absurd_extreme_comparisons)]
24185        #[allow(unused_comparisons)]
24186        if __tmp.remaining() < Self::ENCODED_LEN {
24187            panic!(
24188                "buffer is too small (need {} bytes, but got {})",
24189                Self::ENCODED_LEN,
24190                __tmp.remaining(),
24191            )
24192        }
24193        __tmp.put_u32_le(self.format as u32);
24194        __tmp.put_u8(self.target_system);
24195        __tmp.put_u8(self.target_component);
24196        if matches!(version, MavlinkVersion::V2) {
24197            let len = __tmp.len();
24198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24199        } else {
24200            __tmp.len()
24201        }
24202    }
24203}
24204#[doc = "id: 12919"]
24205#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
24206#[derive(Debug, Clone, PartialEq)]
24207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24209pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24210    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
24211    pub operator_latitude: i32,
24212    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
24213    pub operator_longitude: i32,
24214    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
24215    pub operator_altitude_geo: f32,
24216    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24217    pub timestamp: u32,
24218    #[doc = "System ID (0 for broadcast)."]
24219    pub target_system: u8,
24220    #[doc = "Component ID (0 for broadcast)."]
24221    pub target_component: u8,
24222}
24223impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24224    pub const ENCODED_LEN: usize = 18usize;
24225    pub const DEFAULT: Self = Self {
24226        operator_latitude: 0_i32,
24227        operator_longitude: 0_i32,
24228        operator_altitude_geo: 0.0_f32,
24229        timestamp: 0_u32,
24230        target_system: 0_u8,
24231        target_component: 0_u8,
24232    };
24233    #[cfg(feature = "arbitrary")]
24234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24235        use arbitrary::{Arbitrary, Unstructured};
24236        let mut buf = [0u8; 1024];
24237        rng.fill_bytes(&mut buf);
24238        let mut unstructured = Unstructured::new(&buf);
24239        Self::arbitrary(&mut unstructured).unwrap_or_default()
24240    }
24241}
24242impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24243    fn default() -> Self {
24244        Self::DEFAULT.clone()
24245    }
24246}
24247impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
24248    type Message = MavMessage;
24249    const ID: u32 = 12919u32;
24250    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
24251    const EXTRA_CRC: u8 = 7u8;
24252    const ENCODED_LEN: usize = 18usize;
24253    fn deser(
24254        _version: MavlinkVersion,
24255        __input: &[u8],
24256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24257        let avail_len = __input.len();
24258        let mut payload_buf = [0; Self::ENCODED_LEN];
24259        let mut buf = if avail_len < Self::ENCODED_LEN {
24260            payload_buf[0..avail_len].copy_from_slice(__input);
24261            Bytes::new(&payload_buf)
24262        } else {
24263            Bytes::new(__input)
24264        };
24265        let mut __struct = Self::default();
24266        __struct.operator_latitude = buf.get_i32_le();
24267        __struct.operator_longitude = buf.get_i32_le();
24268        __struct.operator_altitude_geo = buf.get_f32_le();
24269        __struct.timestamp = buf.get_u32_le();
24270        __struct.target_system = buf.get_u8();
24271        __struct.target_component = buf.get_u8();
24272        Ok(__struct)
24273    }
24274    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24275        let mut __tmp = BytesMut::new(bytes);
24276        #[allow(clippy::absurd_extreme_comparisons)]
24277        #[allow(unused_comparisons)]
24278        if __tmp.remaining() < Self::ENCODED_LEN {
24279            panic!(
24280                "buffer is too small (need {} bytes, but got {})",
24281                Self::ENCODED_LEN,
24282                __tmp.remaining(),
24283            )
24284        }
24285        __tmp.put_i32_le(self.operator_latitude);
24286        __tmp.put_i32_le(self.operator_longitude);
24287        __tmp.put_f32_le(self.operator_altitude_geo);
24288        __tmp.put_u32_le(self.timestamp);
24289        __tmp.put_u8(self.target_system);
24290        __tmp.put_u8(self.target_component);
24291        if matches!(version, MavlinkVersion::V2) {
24292            let len = __tmp.len();
24293            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24294        } else {
24295            __tmp.len()
24296        }
24297    }
24298}
24299#[doc = "id: 147"]
24300#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
24301#[derive(Debug, Clone, PartialEq)]
24302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24304pub struct BATTERY_STATUS_DATA {
24305    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
24306    pub current_consumed: i32,
24307    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
24308    pub energy_consumed: i32,
24309    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
24310    pub temperature: i16,
24311    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
24312    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24313    pub voltages: [u16; 10],
24314    #[doc = "Battery current, -1: autopilot does not measure the current"]
24315    pub current_battery: i16,
24316    #[doc = "Battery ID"]
24317    pub id: u8,
24318    #[doc = "Function of the battery"]
24319    pub battery_function: MavBatteryFunction,
24320    #[doc = "Type (chemistry) of the battery"]
24321    pub mavtype: MavBatteryType,
24322    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
24323    pub battery_remaining: i8,
24324    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
24325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24326    pub time_remaining: i32,
24327    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
24328    #[cfg_attr(feature = "serde", serde(default))]
24329    pub charge_state: MavBatteryChargeState,
24330    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
24331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24332    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24333    pub voltages_ext: [u16; 4],
24334    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
24335    #[cfg_attr(feature = "serde", serde(default))]
24336    pub mode: MavBatteryMode,
24337    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
24338    #[cfg_attr(feature = "serde", serde(default))]
24339    pub fault_bitmask: MavBatteryFault,
24340}
24341impl BATTERY_STATUS_DATA {
24342    pub const ENCODED_LEN: usize = 54usize;
24343    pub const DEFAULT: Self = Self {
24344        current_consumed: 0_i32,
24345        energy_consumed: 0_i32,
24346        temperature: 0_i16,
24347        voltages: [0_u16; 10usize],
24348        current_battery: 0_i16,
24349        id: 0_u8,
24350        battery_function: MavBatteryFunction::DEFAULT,
24351        mavtype: MavBatteryType::DEFAULT,
24352        battery_remaining: 0_i8,
24353        time_remaining: 0_i32,
24354        charge_state: MavBatteryChargeState::DEFAULT,
24355        voltages_ext: [0_u16; 4usize],
24356        mode: MavBatteryMode::DEFAULT,
24357        fault_bitmask: MavBatteryFault::DEFAULT,
24358    };
24359    #[cfg(feature = "arbitrary")]
24360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24361        use arbitrary::{Arbitrary, Unstructured};
24362        let mut buf = [0u8; 1024];
24363        rng.fill_bytes(&mut buf);
24364        let mut unstructured = Unstructured::new(&buf);
24365        Self::arbitrary(&mut unstructured).unwrap_or_default()
24366    }
24367}
24368impl Default for BATTERY_STATUS_DATA {
24369    fn default() -> Self {
24370        Self::DEFAULT.clone()
24371    }
24372}
24373impl MessageData for BATTERY_STATUS_DATA {
24374    type Message = MavMessage;
24375    const ID: u32 = 147u32;
24376    const NAME: &'static str = "BATTERY_STATUS";
24377    const EXTRA_CRC: u8 = 154u8;
24378    const ENCODED_LEN: usize = 54usize;
24379    fn deser(
24380        _version: MavlinkVersion,
24381        __input: &[u8],
24382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24383        let avail_len = __input.len();
24384        let mut payload_buf = [0; Self::ENCODED_LEN];
24385        let mut buf = if avail_len < Self::ENCODED_LEN {
24386            payload_buf[0..avail_len].copy_from_slice(__input);
24387            Bytes::new(&payload_buf)
24388        } else {
24389            Bytes::new(__input)
24390        };
24391        let mut __struct = Self::default();
24392        __struct.current_consumed = buf.get_i32_le();
24393        __struct.energy_consumed = buf.get_i32_le();
24394        __struct.temperature = buf.get_i16_le();
24395        for v in &mut __struct.voltages {
24396            let val = buf.get_u16_le();
24397            *v = val;
24398        }
24399        __struct.current_battery = buf.get_i16_le();
24400        __struct.id = buf.get_u8();
24401        let tmp = buf.get_u8();
24402        __struct.battery_function =
24403            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24404                enum_type: "MavBatteryFunction",
24405                value: tmp as u32,
24406            })?;
24407        let tmp = buf.get_u8();
24408        __struct.mavtype =
24409            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24410                enum_type: "MavBatteryType",
24411                value: tmp as u32,
24412            })?;
24413        __struct.battery_remaining = buf.get_i8();
24414        __struct.time_remaining = buf.get_i32_le();
24415        let tmp = buf.get_u8();
24416        __struct.charge_state =
24417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24418                enum_type: "MavBatteryChargeState",
24419                value: tmp as u32,
24420            })?;
24421        for v in &mut __struct.voltages_ext {
24422            let val = buf.get_u16_le();
24423            *v = val;
24424        }
24425        let tmp = buf.get_u8();
24426        __struct.mode =
24427            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24428                enum_type: "MavBatteryMode",
24429                value: tmp as u32,
24430            })?;
24431        let tmp = buf.get_u32_le();
24432        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
24433            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24434                flag_type: "MavBatteryFault",
24435                value: tmp as u32,
24436            })?;
24437        Ok(__struct)
24438    }
24439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24440        let mut __tmp = BytesMut::new(bytes);
24441        #[allow(clippy::absurd_extreme_comparisons)]
24442        #[allow(unused_comparisons)]
24443        if __tmp.remaining() < Self::ENCODED_LEN {
24444            panic!(
24445                "buffer is too small (need {} bytes, but got {})",
24446                Self::ENCODED_LEN,
24447                __tmp.remaining(),
24448            )
24449        }
24450        __tmp.put_i32_le(self.current_consumed);
24451        __tmp.put_i32_le(self.energy_consumed);
24452        __tmp.put_i16_le(self.temperature);
24453        for val in &self.voltages {
24454            __tmp.put_u16_le(*val);
24455        }
24456        __tmp.put_i16_le(self.current_battery);
24457        __tmp.put_u8(self.id);
24458        __tmp.put_u8(self.battery_function as u8);
24459        __tmp.put_u8(self.mavtype as u8);
24460        __tmp.put_i8(self.battery_remaining);
24461        __tmp.put_i32_le(self.time_remaining);
24462        __tmp.put_u8(self.charge_state as u8);
24463        for val in &self.voltages_ext {
24464            __tmp.put_u16_le(*val);
24465        }
24466        __tmp.put_u8(self.mode as u8);
24467        __tmp.put_u32_le(self.fault_bitmask.bits());
24468        if matches!(version, MavlinkVersion::V2) {
24469            let len = __tmp.len();
24470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24471        } else {
24472            __tmp.len()
24473        }
24474    }
24475}
24476#[doc = "id: 370"]
24477#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
24478#[derive(Debug, Clone, PartialEq)]
24479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24481pub struct SMART_BATTERY_INFO_DATA {
24482    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
24483    pub capacity_full_specification: i32,
24484    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
24485    pub capacity_full: i32,
24486    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
24487    pub cycle_count: u16,
24488    #[doc = "Battery weight. 0: field not provided."]
24489    pub weight: u16,
24490    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
24491    pub discharge_minimum_voltage: u16,
24492    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
24493    pub charging_minimum_voltage: u16,
24494    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
24495    pub resting_minimum_voltage: u16,
24496    #[doc = "Battery ID"]
24497    pub id: u8,
24498    #[doc = "Function of the battery"]
24499    pub battery_function: MavBatteryFunction,
24500    #[doc = "Type (chemistry) of the battery"]
24501    pub mavtype: MavBatteryType,
24502    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
24503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24504    pub serial_number: [u8; 16],
24505    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
24506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24507    pub device_name: [u8; 50],
24508    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
24509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24510    pub charging_maximum_voltage: u16,
24511    #[doc = "Number of battery cells in series. 0: field not provided."]
24512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24513    pub cells_in_series: u8,
24514    #[doc = "Maximum pack discharge current. 0: field not provided."]
24515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24516    pub discharge_maximum_current: u32,
24517    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
24518    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24519    pub discharge_maximum_burst_current: u32,
24520    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
24521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24522    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24523    pub manufacture_date: [u8; 11],
24524}
24525impl SMART_BATTERY_INFO_DATA {
24526    pub const ENCODED_LEN: usize = 109usize;
24527    pub const DEFAULT: Self = Self {
24528        capacity_full_specification: 0_i32,
24529        capacity_full: 0_i32,
24530        cycle_count: 0_u16,
24531        weight: 0_u16,
24532        discharge_minimum_voltage: 0_u16,
24533        charging_minimum_voltage: 0_u16,
24534        resting_minimum_voltage: 0_u16,
24535        id: 0_u8,
24536        battery_function: MavBatteryFunction::DEFAULT,
24537        mavtype: MavBatteryType::DEFAULT,
24538        serial_number: [0_u8; 16usize],
24539        device_name: [0_u8; 50usize],
24540        charging_maximum_voltage: 0_u16,
24541        cells_in_series: 0_u8,
24542        discharge_maximum_current: 0_u32,
24543        discharge_maximum_burst_current: 0_u32,
24544        manufacture_date: [0_u8; 11usize],
24545    };
24546    #[cfg(feature = "arbitrary")]
24547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24548        use arbitrary::{Arbitrary, Unstructured};
24549        let mut buf = [0u8; 1024];
24550        rng.fill_bytes(&mut buf);
24551        let mut unstructured = Unstructured::new(&buf);
24552        Self::arbitrary(&mut unstructured).unwrap_or_default()
24553    }
24554}
24555impl Default for SMART_BATTERY_INFO_DATA {
24556    fn default() -> Self {
24557        Self::DEFAULT.clone()
24558    }
24559}
24560impl MessageData for SMART_BATTERY_INFO_DATA {
24561    type Message = MavMessage;
24562    const ID: u32 = 370u32;
24563    const NAME: &'static str = "SMART_BATTERY_INFO";
24564    const EXTRA_CRC: u8 = 75u8;
24565    const ENCODED_LEN: usize = 109usize;
24566    fn deser(
24567        _version: MavlinkVersion,
24568        __input: &[u8],
24569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24570        let avail_len = __input.len();
24571        let mut payload_buf = [0; Self::ENCODED_LEN];
24572        let mut buf = if avail_len < Self::ENCODED_LEN {
24573            payload_buf[0..avail_len].copy_from_slice(__input);
24574            Bytes::new(&payload_buf)
24575        } else {
24576            Bytes::new(__input)
24577        };
24578        let mut __struct = Self::default();
24579        __struct.capacity_full_specification = buf.get_i32_le();
24580        __struct.capacity_full = buf.get_i32_le();
24581        __struct.cycle_count = buf.get_u16_le();
24582        __struct.weight = buf.get_u16_le();
24583        __struct.discharge_minimum_voltage = buf.get_u16_le();
24584        __struct.charging_minimum_voltage = buf.get_u16_le();
24585        __struct.resting_minimum_voltage = buf.get_u16_le();
24586        __struct.id = buf.get_u8();
24587        let tmp = buf.get_u8();
24588        __struct.battery_function =
24589            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24590                enum_type: "MavBatteryFunction",
24591                value: tmp as u32,
24592            })?;
24593        let tmp = buf.get_u8();
24594        __struct.mavtype =
24595            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24596                enum_type: "MavBatteryType",
24597                value: tmp as u32,
24598            })?;
24599        for v in &mut __struct.serial_number {
24600            let val = buf.get_u8();
24601            *v = val;
24602        }
24603        for v in &mut __struct.device_name {
24604            let val = buf.get_u8();
24605            *v = val;
24606        }
24607        __struct.charging_maximum_voltage = buf.get_u16_le();
24608        __struct.cells_in_series = buf.get_u8();
24609        __struct.discharge_maximum_current = buf.get_u32_le();
24610        __struct.discharge_maximum_burst_current = buf.get_u32_le();
24611        for v in &mut __struct.manufacture_date {
24612            let val = buf.get_u8();
24613            *v = val;
24614        }
24615        Ok(__struct)
24616    }
24617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24618        let mut __tmp = BytesMut::new(bytes);
24619        #[allow(clippy::absurd_extreme_comparisons)]
24620        #[allow(unused_comparisons)]
24621        if __tmp.remaining() < Self::ENCODED_LEN {
24622            panic!(
24623                "buffer is too small (need {} bytes, but got {})",
24624                Self::ENCODED_LEN,
24625                __tmp.remaining(),
24626            )
24627        }
24628        __tmp.put_i32_le(self.capacity_full_specification);
24629        __tmp.put_i32_le(self.capacity_full);
24630        __tmp.put_u16_le(self.cycle_count);
24631        __tmp.put_u16_le(self.weight);
24632        __tmp.put_u16_le(self.discharge_minimum_voltage);
24633        __tmp.put_u16_le(self.charging_minimum_voltage);
24634        __tmp.put_u16_le(self.resting_minimum_voltage);
24635        __tmp.put_u8(self.id);
24636        __tmp.put_u8(self.battery_function as u8);
24637        __tmp.put_u8(self.mavtype as u8);
24638        for val in &self.serial_number {
24639            __tmp.put_u8(*val);
24640        }
24641        for val in &self.device_name {
24642            __tmp.put_u8(*val);
24643        }
24644        __tmp.put_u16_le(self.charging_maximum_voltage);
24645        __tmp.put_u8(self.cells_in_series);
24646        __tmp.put_u32_le(self.discharge_maximum_current);
24647        __tmp.put_u32_le(self.discharge_maximum_burst_current);
24648        for val in &self.manufacture_date {
24649            __tmp.put_u8(*val);
24650        }
24651        if matches!(version, MavlinkVersion::V2) {
24652            let len = __tmp.len();
24653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24654        } else {
24655            __tmp.len()
24656        }
24657    }
24658}
24659#[doc = "id: 336"]
24660#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
24661#[derive(Debug, Clone, PartialEq)]
24662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24664pub struct CELLULAR_CONFIG_DATA {
24665    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
24666    pub enable_lte: u8,
24667    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
24668    pub enable_pin: u8,
24669    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
24670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24671    pub pin: [u8; 16],
24672    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
24673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24674    pub new_pin: [u8; 16],
24675    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
24676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24677    pub apn: [u8; 32],
24678    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
24679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24680    pub puk: [u8; 16],
24681    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
24682    pub roaming: u8,
24683    #[doc = "Message acceptance response (sent back to GS)."]
24684    pub response: CellularConfigResponse,
24685}
24686impl CELLULAR_CONFIG_DATA {
24687    pub const ENCODED_LEN: usize = 84usize;
24688    pub const DEFAULT: Self = Self {
24689        enable_lte: 0_u8,
24690        enable_pin: 0_u8,
24691        pin: [0_u8; 16usize],
24692        new_pin: [0_u8; 16usize],
24693        apn: [0_u8; 32usize],
24694        puk: [0_u8; 16usize],
24695        roaming: 0_u8,
24696        response: CellularConfigResponse::DEFAULT,
24697    };
24698    #[cfg(feature = "arbitrary")]
24699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24700        use arbitrary::{Arbitrary, Unstructured};
24701        let mut buf = [0u8; 1024];
24702        rng.fill_bytes(&mut buf);
24703        let mut unstructured = Unstructured::new(&buf);
24704        Self::arbitrary(&mut unstructured).unwrap_or_default()
24705    }
24706}
24707impl Default for CELLULAR_CONFIG_DATA {
24708    fn default() -> Self {
24709        Self::DEFAULT.clone()
24710    }
24711}
24712impl MessageData for CELLULAR_CONFIG_DATA {
24713    type Message = MavMessage;
24714    const ID: u32 = 336u32;
24715    const NAME: &'static str = "CELLULAR_CONFIG";
24716    const EXTRA_CRC: u8 = 245u8;
24717    const ENCODED_LEN: usize = 84usize;
24718    fn deser(
24719        _version: MavlinkVersion,
24720        __input: &[u8],
24721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24722        let avail_len = __input.len();
24723        let mut payload_buf = [0; Self::ENCODED_LEN];
24724        let mut buf = if avail_len < Self::ENCODED_LEN {
24725            payload_buf[0..avail_len].copy_from_slice(__input);
24726            Bytes::new(&payload_buf)
24727        } else {
24728            Bytes::new(__input)
24729        };
24730        let mut __struct = Self::default();
24731        __struct.enable_lte = buf.get_u8();
24732        __struct.enable_pin = buf.get_u8();
24733        for v in &mut __struct.pin {
24734            let val = buf.get_u8();
24735            *v = val;
24736        }
24737        for v in &mut __struct.new_pin {
24738            let val = buf.get_u8();
24739            *v = val;
24740        }
24741        for v in &mut __struct.apn {
24742            let val = buf.get_u8();
24743            *v = val;
24744        }
24745        for v in &mut __struct.puk {
24746            let val = buf.get_u8();
24747            *v = val;
24748        }
24749        __struct.roaming = buf.get_u8();
24750        let tmp = buf.get_u8();
24751        __struct.response =
24752            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24753                enum_type: "CellularConfigResponse",
24754                value: tmp as u32,
24755            })?;
24756        Ok(__struct)
24757    }
24758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24759        let mut __tmp = BytesMut::new(bytes);
24760        #[allow(clippy::absurd_extreme_comparisons)]
24761        #[allow(unused_comparisons)]
24762        if __tmp.remaining() < Self::ENCODED_LEN {
24763            panic!(
24764                "buffer is too small (need {} bytes, but got {})",
24765                Self::ENCODED_LEN,
24766                __tmp.remaining(),
24767            )
24768        }
24769        __tmp.put_u8(self.enable_lte);
24770        __tmp.put_u8(self.enable_pin);
24771        for val in &self.pin {
24772            __tmp.put_u8(*val);
24773        }
24774        for val in &self.new_pin {
24775            __tmp.put_u8(*val);
24776        }
24777        for val in &self.apn {
24778            __tmp.put_u8(*val);
24779        }
24780        for val in &self.puk {
24781            __tmp.put_u8(*val);
24782        }
24783        __tmp.put_u8(self.roaming);
24784        __tmp.put_u8(self.response as u8);
24785        if matches!(version, MavlinkVersion::V2) {
24786            let len = __tmp.len();
24787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24788        } else {
24789            __tmp.len()
24790        }
24791    }
24792}
24793#[doc = "id: 282"]
24794#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
24795#[derive(Debug, Clone, PartialEq)]
24796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24798pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
24799    #[doc = "High level gimbal manager flags to use."]
24800    pub flags: GimbalManagerFlags,
24801    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
24802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24803    pub q: [f32; 4],
24804    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
24805    pub angular_velocity_x: f32,
24806    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
24807    pub angular_velocity_y: f32,
24808    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
24809    pub angular_velocity_z: f32,
24810    #[doc = "System ID"]
24811    pub target_system: u8,
24812    #[doc = "Component ID"]
24813    pub target_component: u8,
24814    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
24815    pub gimbal_device_id: u8,
24816}
24817impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
24818    pub const ENCODED_LEN: usize = 35usize;
24819    pub const DEFAULT: Self = Self {
24820        flags: GimbalManagerFlags::DEFAULT,
24821        q: [0.0_f32; 4usize],
24822        angular_velocity_x: 0.0_f32,
24823        angular_velocity_y: 0.0_f32,
24824        angular_velocity_z: 0.0_f32,
24825        target_system: 0_u8,
24826        target_component: 0_u8,
24827        gimbal_device_id: 0_u8,
24828    };
24829    #[cfg(feature = "arbitrary")]
24830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24831        use arbitrary::{Arbitrary, Unstructured};
24832        let mut buf = [0u8; 1024];
24833        rng.fill_bytes(&mut buf);
24834        let mut unstructured = Unstructured::new(&buf);
24835        Self::arbitrary(&mut unstructured).unwrap_or_default()
24836    }
24837}
24838impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
24839    fn default() -> Self {
24840        Self::DEFAULT.clone()
24841    }
24842}
24843impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
24844    type Message = MavMessage;
24845    const ID: u32 = 282u32;
24846    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
24847    const EXTRA_CRC: u8 = 123u8;
24848    const ENCODED_LEN: usize = 35usize;
24849    fn deser(
24850        _version: MavlinkVersion,
24851        __input: &[u8],
24852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24853        let avail_len = __input.len();
24854        let mut payload_buf = [0; Self::ENCODED_LEN];
24855        let mut buf = if avail_len < Self::ENCODED_LEN {
24856            payload_buf[0..avail_len].copy_from_slice(__input);
24857            Bytes::new(&payload_buf)
24858        } else {
24859            Bytes::new(__input)
24860        };
24861        let mut __struct = Self::default();
24862        let tmp = buf.get_u32_le();
24863        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
24864            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24865                flag_type: "GimbalManagerFlags",
24866                value: tmp as u32,
24867            })?;
24868        for v in &mut __struct.q {
24869            let val = buf.get_f32_le();
24870            *v = val;
24871        }
24872        __struct.angular_velocity_x = buf.get_f32_le();
24873        __struct.angular_velocity_y = buf.get_f32_le();
24874        __struct.angular_velocity_z = buf.get_f32_le();
24875        __struct.target_system = buf.get_u8();
24876        __struct.target_component = buf.get_u8();
24877        __struct.gimbal_device_id = buf.get_u8();
24878        Ok(__struct)
24879    }
24880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24881        let mut __tmp = BytesMut::new(bytes);
24882        #[allow(clippy::absurd_extreme_comparisons)]
24883        #[allow(unused_comparisons)]
24884        if __tmp.remaining() < Self::ENCODED_LEN {
24885            panic!(
24886                "buffer is too small (need {} bytes, but got {})",
24887                Self::ENCODED_LEN,
24888                __tmp.remaining(),
24889            )
24890        }
24891        __tmp.put_u32_le(self.flags.bits());
24892        for val in &self.q {
24893            __tmp.put_f32_le(*val);
24894        }
24895        __tmp.put_f32_le(self.angular_velocity_x);
24896        __tmp.put_f32_le(self.angular_velocity_y);
24897        __tmp.put_f32_le(self.angular_velocity_z);
24898        __tmp.put_u8(self.target_system);
24899        __tmp.put_u8(self.target_component);
24900        __tmp.put_u8(self.gimbal_device_id);
24901        if matches!(version, MavlinkVersion::V2) {
24902            let len = __tmp.len();
24903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24904        } else {
24905            __tmp.len()
24906        }
24907    }
24908}
24909#[doc = "id: 70"]
24910#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
24911#[derive(Debug, Clone, PartialEq)]
24912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24914pub struct RC_CHANNELS_OVERRIDE_DATA {
24915    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24916    pub chan1_raw: u16,
24917    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24918    pub chan2_raw: u16,
24919    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24920    pub chan3_raw: u16,
24921    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24922    pub chan4_raw: u16,
24923    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24924    pub chan5_raw: u16,
24925    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24926    pub chan6_raw: u16,
24927    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24928    pub chan7_raw: u16,
24929    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24930    pub chan8_raw: u16,
24931    #[doc = "System ID"]
24932    pub target_system: u8,
24933    #[doc = "Component ID"]
24934    pub target_component: u8,
24935    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24937    pub chan9_raw: u16,
24938    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24940    pub chan10_raw: u16,
24941    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24942    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24943    pub chan11_raw: u16,
24944    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24945    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24946    pub chan12_raw: u16,
24947    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24949    pub chan13_raw: u16,
24950    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24952    pub chan14_raw: u16,
24953    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24954    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24955    pub chan15_raw: u16,
24956    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24957    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24958    pub chan16_raw: u16,
24959    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24960    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24961    pub chan17_raw: u16,
24962    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24964    pub chan18_raw: u16,
24965}
24966impl RC_CHANNELS_OVERRIDE_DATA {
24967    pub const ENCODED_LEN: usize = 38usize;
24968    pub const DEFAULT: Self = Self {
24969        chan1_raw: 0_u16,
24970        chan2_raw: 0_u16,
24971        chan3_raw: 0_u16,
24972        chan4_raw: 0_u16,
24973        chan5_raw: 0_u16,
24974        chan6_raw: 0_u16,
24975        chan7_raw: 0_u16,
24976        chan8_raw: 0_u16,
24977        target_system: 0_u8,
24978        target_component: 0_u8,
24979        chan9_raw: 0_u16,
24980        chan10_raw: 0_u16,
24981        chan11_raw: 0_u16,
24982        chan12_raw: 0_u16,
24983        chan13_raw: 0_u16,
24984        chan14_raw: 0_u16,
24985        chan15_raw: 0_u16,
24986        chan16_raw: 0_u16,
24987        chan17_raw: 0_u16,
24988        chan18_raw: 0_u16,
24989    };
24990    #[cfg(feature = "arbitrary")]
24991    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24992        use arbitrary::{Arbitrary, Unstructured};
24993        let mut buf = [0u8; 1024];
24994        rng.fill_bytes(&mut buf);
24995        let mut unstructured = Unstructured::new(&buf);
24996        Self::arbitrary(&mut unstructured).unwrap_or_default()
24997    }
24998}
24999impl Default for RC_CHANNELS_OVERRIDE_DATA {
25000    fn default() -> Self {
25001        Self::DEFAULT.clone()
25002    }
25003}
25004impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25005    type Message = MavMessage;
25006    const ID: u32 = 70u32;
25007    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25008    const EXTRA_CRC: u8 = 124u8;
25009    const ENCODED_LEN: usize = 38usize;
25010    fn deser(
25011        _version: MavlinkVersion,
25012        __input: &[u8],
25013    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25014        let avail_len = __input.len();
25015        let mut payload_buf = [0; Self::ENCODED_LEN];
25016        let mut buf = if avail_len < Self::ENCODED_LEN {
25017            payload_buf[0..avail_len].copy_from_slice(__input);
25018            Bytes::new(&payload_buf)
25019        } else {
25020            Bytes::new(__input)
25021        };
25022        let mut __struct = Self::default();
25023        __struct.chan1_raw = buf.get_u16_le();
25024        __struct.chan2_raw = buf.get_u16_le();
25025        __struct.chan3_raw = buf.get_u16_le();
25026        __struct.chan4_raw = buf.get_u16_le();
25027        __struct.chan5_raw = buf.get_u16_le();
25028        __struct.chan6_raw = buf.get_u16_le();
25029        __struct.chan7_raw = buf.get_u16_le();
25030        __struct.chan8_raw = buf.get_u16_le();
25031        __struct.target_system = buf.get_u8();
25032        __struct.target_component = buf.get_u8();
25033        __struct.chan9_raw = buf.get_u16_le();
25034        __struct.chan10_raw = buf.get_u16_le();
25035        __struct.chan11_raw = buf.get_u16_le();
25036        __struct.chan12_raw = buf.get_u16_le();
25037        __struct.chan13_raw = buf.get_u16_le();
25038        __struct.chan14_raw = buf.get_u16_le();
25039        __struct.chan15_raw = buf.get_u16_le();
25040        __struct.chan16_raw = buf.get_u16_le();
25041        __struct.chan17_raw = buf.get_u16_le();
25042        __struct.chan18_raw = buf.get_u16_le();
25043        Ok(__struct)
25044    }
25045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25046        let mut __tmp = BytesMut::new(bytes);
25047        #[allow(clippy::absurd_extreme_comparisons)]
25048        #[allow(unused_comparisons)]
25049        if __tmp.remaining() < Self::ENCODED_LEN {
25050            panic!(
25051                "buffer is too small (need {} bytes, but got {})",
25052                Self::ENCODED_LEN,
25053                __tmp.remaining(),
25054            )
25055        }
25056        __tmp.put_u16_le(self.chan1_raw);
25057        __tmp.put_u16_le(self.chan2_raw);
25058        __tmp.put_u16_le(self.chan3_raw);
25059        __tmp.put_u16_le(self.chan4_raw);
25060        __tmp.put_u16_le(self.chan5_raw);
25061        __tmp.put_u16_le(self.chan6_raw);
25062        __tmp.put_u16_le(self.chan7_raw);
25063        __tmp.put_u16_le(self.chan8_raw);
25064        __tmp.put_u8(self.target_system);
25065        __tmp.put_u8(self.target_component);
25066        __tmp.put_u16_le(self.chan9_raw);
25067        __tmp.put_u16_le(self.chan10_raw);
25068        __tmp.put_u16_le(self.chan11_raw);
25069        __tmp.put_u16_le(self.chan12_raw);
25070        __tmp.put_u16_le(self.chan13_raw);
25071        __tmp.put_u16_le(self.chan14_raw);
25072        __tmp.put_u16_le(self.chan15_raw);
25073        __tmp.put_u16_le(self.chan16_raw);
25074        __tmp.put_u16_le(self.chan17_raw);
25075        __tmp.put_u16_le(self.chan18_raw);
25076        if matches!(version, MavlinkVersion::V2) {
25077            let len = __tmp.len();
25078            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25079        } else {
25080            __tmp.len()
25081        }
25082    }
25083}
25084#[doc = "id: 162"]
25085#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
25086#[derive(Debug, Clone, PartialEq)]
25087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25089pub struct FENCE_STATUS_DATA {
25090    #[doc = "Time (since boot) of last breach."]
25091    pub breach_time: u32,
25092    #[doc = "Number of fence breaches."]
25093    pub breach_count: u16,
25094    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
25095    pub breach_status: u8,
25096    #[doc = "Last breach type."]
25097    pub breach_type: FenceBreach,
25098    #[doc = "Active action to prevent fence breach"]
25099    #[cfg_attr(feature = "serde", serde(default))]
25100    pub breach_mitigation: FenceMitigate,
25101}
25102impl FENCE_STATUS_DATA {
25103    pub const ENCODED_LEN: usize = 9usize;
25104    pub const DEFAULT: Self = Self {
25105        breach_time: 0_u32,
25106        breach_count: 0_u16,
25107        breach_status: 0_u8,
25108        breach_type: FenceBreach::DEFAULT,
25109        breach_mitigation: FenceMitigate::DEFAULT,
25110    };
25111    #[cfg(feature = "arbitrary")]
25112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25113        use arbitrary::{Arbitrary, Unstructured};
25114        let mut buf = [0u8; 1024];
25115        rng.fill_bytes(&mut buf);
25116        let mut unstructured = Unstructured::new(&buf);
25117        Self::arbitrary(&mut unstructured).unwrap_or_default()
25118    }
25119}
25120impl Default for FENCE_STATUS_DATA {
25121    fn default() -> Self {
25122        Self::DEFAULT.clone()
25123    }
25124}
25125impl MessageData for FENCE_STATUS_DATA {
25126    type Message = MavMessage;
25127    const ID: u32 = 162u32;
25128    const NAME: &'static str = "FENCE_STATUS";
25129    const EXTRA_CRC: u8 = 189u8;
25130    const ENCODED_LEN: usize = 9usize;
25131    fn deser(
25132        _version: MavlinkVersion,
25133        __input: &[u8],
25134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25135        let avail_len = __input.len();
25136        let mut payload_buf = [0; Self::ENCODED_LEN];
25137        let mut buf = if avail_len < Self::ENCODED_LEN {
25138            payload_buf[0..avail_len].copy_from_slice(__input);
25139            Bytes::new(&payload_buf)
25140        } else {
25141            Bytes::new(__input)
25142        };
25143        let mut __struct = Self::default();
25144        __struct.breach_time = buf.get_u32_le();
25145        __struct.breach_count = buf.get_u16_le();
25146        __struct.breach_status = buf.get_u8();
25147        let tmp = buf.get_u8();
25148        __struct.breach_type =
25149            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25150                enum_type: "FenceBreach",
25151                value: tmp as u32,
25152            })?;
25153        let tmp = buf.get_u8();
25154        __struct.breach_mitigation =
25155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25156                enum_type: "FenceMitigate",
25157                value: tmp as u32,
25158            })?;
25159        Ok(__struct)
25160    }
25161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25162        let mut __tmp = BytesMut::new(bytes);
25163        #[allow(clippy::absurd_extreme_comparisons)]
25164        #[allow(unused_comparisons)]
25165        if __tmp.remaining() < Self::ENCODED_LEN {
25166            panic!(
25167                "buffer is too small (need {} bytes, but got {})",
25168                Self::ENCODED_LEN,
25169                __tmp.remaining(),
25170            )
25171        }
25172        __tmp.put_u32_le(self.breach_time);
25173        __tmp.put_u16_le(self.breach_count);
25174        __tmp.put_u8(self.breach_status);
25175        __tmp.put_u8(self.breach_type as u8);
25176        __tmp.put_u8(self.breach_mitigation as u8);
25177        if matches!(version, MavlinkVersion::V2) {
25178            let len = __tmp.len();
25179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25180        } else {
25181            __tmp.len()
25182        }
25183    }
25184}
25185#[doc = "id: 311"]
25186#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
25187#[derive(Debug, Clone, PartialEq)]
25188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25190pub struct UAVCAN_NODE_INFO_DATA {
25191    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25192    pub time_usec: u64,
25193    #[doc = "Time since the start-up of the node."]
25194    pub uptime_sec: u32,
25195    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
25196    pub sw_vcs_commit: u32,
25197    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
25198    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25199    pub name: [u8; 80],
25200    #[doc = "Hardware major version number."]
25201    pub hw_version_major: u8,
25202    #[doc = "Hardware minor version number."]
25203    pub hw_version_minor: u8,
25204    #[doc = "Hardware unique 128-bit ID."]
25205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25206    pub hw_unique_id: [u8; 16],
25207    #[doc = "Software major version number."]
25208    pub sw_version_major: u8,
25209    #[doc = "Software minor version number."]
25210    pub sw_version_minor: u8,
25211}
25212impl UAVCAN_NODE_INFO_DATA {
25213    pub const ENCODED_LEN: usize = 116usize;
25214    pub const DEFAULT: Self = Self {
25215        time_usec: 0_u64,
25216        uptime_sec: 0_u32,
25217        sw_vcs_commit: 0_u32,
25218        name: [0_u8; 80usize],
25219        hw_version_major: 0_u8,
25220        hw_version_minor: 0_u8,
25221        hw_unique_id: [0_u8; 16usize],
25222        sw_version_major: 0_u8,
25223        sw_version_minor: 0_u8,
25224    };
25225    #[cfg(feature = "arbitrary")]
25226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25227        use arbitrary::{Arbitrary, Unstructured};
25228        let mut buf = [0u8; 1024];
25229        rng.fill_bytes(&mut buf);
25230        let mut unstructured = Unstructured::new(&buf);
25231        Self::arbitrary(&mut unstructured).unwrap_or_default()
25232    }
25233}
25234impl Default for UAVCAN_NODE_INFO_DATA {
25235    fn default() -> Self {
25236        Self::DEFAULT.clone()
25237    }
25238}
25239impl MessageData for UAVCAN_NODE_INFO_DATA {
25240    type Message = MavMessage;
25241    const ID: u32 = 311u32;
25242    const NAME: &'static str = "UAVCAN_NODE_INFO";
25243    const EXTRA_CRC: u8 = 95u8;
25244    const ENCODED_LEN: usize = 116usize;
25245    fn deser(
25246        _version: MavlinkVersion,
25247        __input: &[u8],
25248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25249        let avail_len = __input.len();
25250        let mut payload_buf = [0; Self::ENCODED_LEN];
25251        let mut buf = if avail_len < Self::ENCODED_LEN {
25252            payload_buf[0..avail_len].copy_from_slice(__input);
25253            Bytes::new(&payload_buf)
25254        } else {
25255            Bytes::new(__input)
25256        };
25257        let mut __struct = Self::default();
25258        __struct.time_usec = buf.get_u64_le();
25259        __struct.uptime_sec = buf.get_u32_le();
25260        __struct.sw_vcs_commit = buf.get_u32_le();
25261        for v in &mut __struct.name {
25262            let val = buf.get_u8();
25263            *v = val;
25264        }
25265        __struct.hw_version_major = buf.get_u8();
25266        __struct.hw_version_minor = buf.get_u8();
25267        for v in &mut __struct.hw_unique_id {
25268            let val = buf.get_u8();
25269            *v = val;
25270        }
25271        __struct.sw_version_major = buf.get_u8();
25272        __struct.sw_version_minor = buf.get_u8();
25273        Ok(__struct)
25274    }
25275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25276        let mut __tmp = BytesMut::new(bytes);
25277        #[allow(clippy::absurd_extreme_comparisons)]
25278        #[allow(unused_comparisons)]
25279        if __tmp.remaining() < Self::ENCODED_LEN {
25280            panic!(
25281                "buffer is too small (need {} bytes, but got {})",
25282                Self::ENCODED_LEN,
25283                __tmp.remaining(),
25284            )
25285        }
25286        __tmp.put_u64_le(self.time_usec);
25287        __tmp.put_u32_le(self.uptime_sec);
25288        __tmp.put_u32_le(self.sw_vcs_commit);
25289        for val in &self.name {
25290            __tmp.put_u8(*val);
25291        }
25292        __tmp.put_u8(self.hw_version_major);
25293        __tmp.put_u8(self.hw_version_minor);
25294        for val in &self.hw_unique_id {
25295            __tmp.put_u8(*val);
25296        }
25297        __tmp.put_u8(self.sw_version_major);
25298        __tmp.put_u8(self.sw_version_minor);
25299        if matches!(version, MavlinkVersion::V2) {
25300            let len = __tmp.len();
25301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25302        } else {
25303            __tmp.len()
25304        }
25305    }
25306}
25307#[doc = "id: 12900"]
25308#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
25309#[derive(Debug, Clone, PartialEq)]
25310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25312pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
25313    #[doc = "System ID (0 for broadcast)."]
25314    pub target_system: u8,
25315    #[doc = "Component ID (0 for broadcast)."]
25316    pub target_component: u8,
25317    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
25318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25319    pub id_or_mac: [u8; 20],
25320    #[doc = "Indicates the format for the uas_id field of this message."]
25321    pub id_type: MavOdidIdType,
25322    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
25323    pub ua_type: MavOdidUaType,
25324    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
25325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25326    pub uas_id: [u8; 20],
25327}
25328impl OPEN_DRONE_ID_BASIC_ID_DATA {
25329    pub const ENCODED_LEN: usize = 44usize;
25330    pub const DEFAULT: Self = Self {
25331        target_system: 0_u8,
25332        target_component: 0_u8,
25333        id_or_mac: [0_u8; 20usize],
25334        id_type: MavOdidIdType::DEFAULT,
25335        ua_type: MavOdidUaType::DEFAULT,
25336        uas_id: [0_u8; 20usize],
25337    };
25338    #[cfg(feature = "arbitrary")]
25339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25340        use arbitrary::{Arbitrary, Unstructured};
25341        let mut buf = [0u8; 1024];
25342        rng.fill_bytes(&mut buf);
25343        let mut unstructured = Unstructured::new(&buf);
25344        Self::arbitrary(&mut unstructured).unwrap_or_default()
25345    }
25346}
25347impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
25348    fn default() -> Self {
25349        Self::DEFAULT.clone()
25350    }
25351}
25352impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
25353    type Message = MavMessage;
25354    const ID: u32 = 12900u32;
25355    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
25356    const EXTRA_CRC: u8 = 114u8;
25357    const ENCODED_LEN: usize = 44usize;
25358    fn deser(
25359        _version: MavlinkVersion,
25360        __input: &[u8],
25361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25362        let avail_len = __input.len();
25363        let mut payload_buf = [0; Self::ENCODED_LEN];
25364        let mut buf = if avail_len < Self::ENCODED_LEN {
25365            payload_buf[0..avail_len].copy_from_slice(__input);
25366            Bytes::new(&payload_buf)
25367        } else {
25368            Bytes::new(__input)
25369        };
25370        let mut __struct = Self::default();
25371        __struct.target_system = buf.get_u8();
25372        __struct.target_component = buf.get_u8();
25373        for v in &mut __struct.id_or_mac {
25374            let val = buf.get_u8();
25375            *v = val;
25376        }
25377        let tmp = buf.get_u8();
25378        __struct.id_type =
25379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25380                enum_type: "MavOdidIdType",
25381                value: tmp as u32,
25382            })?;
25383        let tmp = buf.get_u8();
25384        __struct.ua_type =
25385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25386                enum_type: "MavOdidUaType",
25387                value: tmp as u32,
25388            })?;
25389        for v in &mut __struct.uas_id {
25390            let val = buf.get_u8();
25391            *v = val;
25392        }
25393        Ok(__struct)
25394    }
25395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25396        let mut __tmp = BytesMut::new(bytes);
25397        #[allow(clippy::absurd_extreme_comparisons)]
25398        #[allow(unused_comparisons)]
25399        if __tmp.remaining() < Self::ENCODED_LEN {
25400            panic!(
25401                "buffer is too small (need {} bytes, but got {})",
25402                Self::ENCODED_LEN,
25403                __tmp.remaining(),
25404            )
25405        }
25406        __tmp.put_u8(self.target_system);
25407        __tmp.put_u8(self.target_component);
25408        for val in &self.id_or_mac {
25409            __tmp.put_u8(*val);
25410        }
25411        __tmp.put_u8(self.id_type as u8);
25412        __tmp.put_u8(self.ua_type as u8);
25413        for val in &self.uas_id {
25414            __tmp.put_u8(*val);
25415        }
25416        if matches!(version, MavlinkVersion::V2) {
25417            let len = __tmp.len();
25418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25419        } else {
25420            __tmp.len()
25421        }
25422    }
25423}
25424#[doc = "id: 130"]
25425#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
25426#[derive(Debug, Clone, PartialEq)]
25427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25429pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
25430    #[doc = "total data size (set on ACK only)."]
25431    pub size: u32,
25432    #[doc = "Width of a matrix or image."]
25433    pub width: u16,
25434    #[doc = "Height of a matrix or image."]
25435    pub height: u16,
25436    #[doc = "Number of packets being sent (set on ACK only)."]
25437    pub packets: u16,
25438    #[doc = "Type of requested/acknowledged data."]
25439    pub mavtype: MavlinkDataStreamType,
25440    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
25441    pub payload: u8,
25442    #[doc = "JPEG quality. Values: [1-100]."]
25443    pub jpg_quality: u8,
25444}
25445impl DATA_TRANSMISSION_HANDSHAKE_DATA {
25446    pub const ENCODED_LEN: usize = 13usize;
25447    pub const DEFAULT: Self = Self {
25448        size: 0_u32,
25449        width: 0_u16,
25450        height: 0_u16,
25451        packets: 0_u16,
25452        mavtype: MavlinkDataStreamType::DEFAULT,
25453        payload: 0_u8,
25454        jpg_quality: 0_u8,
25455    };
25456    #[cfg(feature = "arbitrary")]
25457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25458        use arbitrary::{Arbitrary, Unstructured};
25459        let mut buf = [0u8; 1024];
25460        rng.fill_bytes(&mut buf);
25461        let mut unstructured = Unstructured::new(&buf);
25462        Self::arbitrary(&mut unstructured).unwrap_or_default()
25463    }
25464}
25465impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
25466    fn default() -> Self {
25467        Self::DEFAULT.clone()
25468    }
25469}
25470impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
25471    type Message = MavMessage;
25472    const ID: u32 = 130u32;
25473    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
25474    const EXTRA_CRC: u8 = 29u8;
25475    const ENCODED_LEN: usize = 13usize;
25476    fn deser(
25477        _version: MavlinkVersion,
25478        __input: &[u8],
25479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25480        let avail_len = __input.len();
25481        let mut payload_buf = [0; Self::ENCODED_LEN];
25482        let mut buf = if avail_len < Self::ENCODED_LEN {
25483            payload_buf[0..avail_len].copy_from_slice(__input);
25484            Bytes::new(&payload_buf)
25485        } else {
25486            Bytes::new(__input)
25487        };
25488        let mut __struct = Self::default();
25489        __struct.size = buf.get_u32_le();
25490        __struct.width = buf.get_u16_le();
25491        __struct.height = buf.get_u16_le();
25492        __struct.packets = buf.get_u16_le();
25493        let tmp = buf.get_u8();
25494        __struct.mavtype =
25495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25496                enum_type: "MavlinkDataStreamType",
25497                value: tmp as u32,
25498            })?;
25499        __struct.payload = buf.get_u8();
25500        __struct.jpg_quality = buf.get_u8();
25501        Ok(__struct)
25502    }
25503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25504        let mut __tmp = BytesMut::new(bytes);
25505        #[allow(clippy::absurd_extreme_comparisons)]
25506        #[allow(unused_comparisons)]
25507        if __tmp.remaining() < Self::ENCODED_LEN {
25508            panic!(
25509                "buffer is too small (need {} bytes, but got {})",
25510                Self::ENCODED_LEN,
25511                __tmp.remaining(),
25512            )
25513        }
25514        __tmp.put_u32_le(self.size);
25515        __tmp.put_u16_le(self.width);
25516        __tmp.put_u16_le(self.height);
25517        __tmp.put_u16_le(self.packets);
25518        __tmp.put_u8(self.mavtype as u8);
25519        __tmp.put_u8(self.payload);
25520        __tmp.put_u8(self.jpg_quality);
25521        if matches!(version, MavlinkVersion::V2) {
25522            let len = __tmp.len();
25523            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25524        } else {
25525            __tmp.len()
25526        }
25527    }
25528}
25529#[doc = "id: 80"]
25530#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
25531#[derive(Debug, Clone, PartialEq)]
25532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25534pub struct COMMAND_CANCEL_DATA {
25535    #[doc = "Command ID (of command to cancel)."]
25536    pub command: MavCmd,
25537    #[doc = "System executing long running command. Should not be broadcast (0)."]
25538    pub target_system: u8,
25539    #[doc = "Component executing long running command."]
25540    pub target_component: u8,
25541}
25542impl COMMAND_CANCEL_DATA {
25543    pub const ENCODED_LEN: usize = 4usize;
25544    pub const DEFAULT: Self = Self {
25545        command: MavCmd::DEFAULT,
25546        target_system: 0_u8,
25547        target_component: 0_u8,
25548    };
25549    #[cfg(feature = "arbitrary")]
25550    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25551        use arbitrary::{Arbitrary, Unstructured};
25552        let mut buf = [0u8; 1024];
25553        rng.fill_bytes(&mut buf);
25554        let mut unstructured = Unstructured::new(&buf);
25555        Self::arbitrary(&mut unstructured).unwrap_or_default()
25556    }
25557}
25558impl Default for COMMAND_CANCEL_DATA {
25559    fn default() -> Self {
25560        Self::DEFAULT.clone()
25561    }
25562}
25563impl MessageData for COMMAND_CANCEL_DATA {
25564    type Message = MavMessage;
25565    const ID: u32 = 80u32;
25566    const NAME: &'static str = "COMMAND_CANCEL";
25567    const EXTRA_CRC: u8 = 14u8;
25568    const ENCODED_LEN: usize = 4usize;
25569    fn deser(
25570        _version: MavlinkVersion,
25571        __input: &[u8],
25572    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25573        let avail_len = __input.len();
25574        let mut payload_buf = [0; Self::ENCODED_LEN];
25575        let mut buf = if avail_len < Self::ENCODED_LEN {
25576            payload_buf[0..avail_len].copy_from_slice(__input);
25577            Bytes::new(&payload_buf)
25578        } else {
25579            Bytes::new(__input)
25580        };
25581        let mut __struct = Self::default();
25582        let tmp = buf.get_u16_le();
25583        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
25584            ::mavlink_core::error::ParserError::InvalidEnum {
25585                enum_type: "MavCmd",
25586                value: tmp as u32,
25587            },
25588        )?;
25589        __struct.target_system = buf.get_u8();
25590        __struct.target_component = buf.get_u8();
25591        Ok(__struct)
25592    }
25593    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25594        let mut __tmp = BytesMut::new(bytes);
25595        #[allow(clippy::absurd_extreme_comparisons)]
25596        #[allow(unused_comparisons)]
25597        if __tmp.remaining() < Self::ENCODED_LEN {
25598            panic!(
25599                "buffer is too small (need {} bytes, but got {})",
25600                Self::ENCODED_LEN,
25601                __tmp.remaining(),
25602            )
25603        }
25604        __tmp.put_u16_le(self.command as u16);
25605        __tmp.put_u8(self.target_system);
25606        __tmp.put_u8(self.target_component);
25607        if matches!(version, MavlinkVersion::V2) {
25608            let len = __tmp.len();
25609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25610        } else {
25611            __tmp.len()
25612        }
25613    }
25614}
25615#[doc = "id: 100"]
25616#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
25617#[derive(Debug, Clone, PartialEq)]
25618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25620pub struct OPTICAL_FLOW_DATA {
25621    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25622    pub time_usec: u64,
25623    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
25624    pub flow_comp_m_x: f32,
25625    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
25626    pub flow_comp_m_y: f32,
25627    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
25628    pub ground_distance: f32,
25629    #[doc = "Flow in x-sensor direction"]
25630    pub flow_x: i16,
25631    #[doc = "Flow in y-sensor direction"]
25632    pub flow_y: i16,
25633    #[doc = "Sensor ID"]
25634    pub sensor_id: u8,
25635    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
25636    pub quality: u8,
25637    #[doc = "Flow rate about X axis"]
25638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25639    pub flow_rate_x: f32,
25640    #[doc = "Flow rate about Y axis"]
25641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25642    pub flow_rate_y: f32,
25643}
25644impl OPTICAL_FLOW_DATA {
25645    pub const ENCODED_LEN: usize = 34usize;
25646    pub const DEFAULT: Self = Self {
25647        time_usec: 0_u64,
25648        flow_comp_m_x: 0.0_f32,
25649        flow_comp_m_y: 0.0_f32,
25650        ground_distance: 0.0_f32,
25651        flow_x: 0_i16,
25652        flow_y: 0_i16,
25653        sensor_id: 0_u8,
25654        quality: 0_u8,
25655        flow_rate_x: 0.0_f32,
25656        flow_rate_y: 0.0_f32,
25657    };
25658    #[cfg(feature = "arbitrary")]
25659    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25660        use arbitrary::{Arbitrary, Unstructured};
25661        let mut buf = [0u8; 1024];
25662        rng.fill_bytes(&mut buf);
25663        let mut unstructured = Unstructured::new(&buf);
25664        Self::arbitrary(&mut unstructured).unwrap_or_default()
25665    }
25666}
25667impl Default for OPTICAL_FLOW_DATA {
25668    fn default() -> Self {
25669        Self::DEFAULT.clone()
25670    }
25671}
25672impl MessageData for OPTICAL_FLOW_DATA {
25673    type Message = MavMessage;
25674    const ID: u32 = 100u32;
25675    const NAME: &'static str = "OPTICAL_FLOW";
25676    const EXTRA_CRC: u8 = 175u8;
25677    const ENCODED_LEN: usize = 34usize;
25678    fn deser(
25679        _version: MavlinkVersion,
25680        __input: &[u8],
25681    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25682        let avail_len = __input.len();
25683        let mut payload_buf = [0; Self::ENCODED_LEN];
25684        let mut buf = if avail_len < Self::ENCODED_LEN {
25685            payload_buf[0..avail_len].copy_from_slice(__input);
25686            Bytes::new(&payload_buf)
25687        } else {
25688            Bytes::new(__input)
25689        };
25690        let mut __struct = Self::default();
25691        __struct.time_usec = buf.get_u64_le();
25692        __struct.flow_comp_m_x = buf.get_f32_le();
25693        __struct.flow_comp_m_y = buf.get_f32_le();
25694        __struct.ground_distance = buf.get_f32_le();
25695        __struct.flow_x = buf.get_i16_le();
25696        __struct.flow_y = buf.get_i16_le();
25697        __struct.sensor_id = buf.get_u8();
25698        __struct.quality = buf.get_u8();
25699        __struct.flow_rate_x = buf.get_f32_le();
25700        __struct.flow_rate_y = buf.get_f32_le();
25701        Ok(__struct)
25702    }
25703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25704        let mut __tmp = BytesMut::new(bytes);
25705        #[allow(clippy::absurd_extreme_comparisons)]
25706        #[allow(unused_comparisons)]
25707        if __tmp.remaining() < Self::ENCODED_LEN {
25708            panic!(
25709                "buffer is too small (need {} bytes, but got {})",
25710                Self::ENCODED_LEN,
25711                __tmp.remaining(),
25712            )
25713        }
25714        __tmp.put_u64_le(self.time_usec);
25715        __tmp.put_f32_le(self.flow_comp_m_x);
25716        __tmp.put_f32_le(self.flow_comp_m_y);
25717        __tmp.put_f32_le(self.ground_distance);
25718        __tmp.put_i16_le(self.flow_x);
25719        __tmp.put_i16_le(self.flow_y);
25720        __tmp.put_u8(self.sensor_id);
25721        __tmp.put_u8(self.quality);
25722        __tmp.put_f32_le(self.flow_rate_x);
25723        __tmp.put_f32_le(self.flow_rate_y);
25724        if matches!(version, MavlinkVersion::V2) {
25725            let len = __tmp.len();
25726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25727        } else {
25728            __tmp.len()
25729        }
25730    }
25731}
25732#[doc = "id: 141"]
25733#[doc = "The current system altitude."]
25734#[derive(Debug, Clone, PartialEq)]
25735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25737pub struct ALTITUDE_DATA {
25738    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25739    pub time_usec: u64,
25740    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
25741    pub altitude_monotonic: f32,
25742    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
25743    pub altitude_amsl: f32,
25744    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
25745    pub altitude_local: f32,
25746    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
25747    pub altitude_relative: f32,
25748    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
25749    pub altitude_terrain: f32,
25750    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
25751    pub bottom_clearance: f32,
25752}
25753impl ALTITUDE_DATA {
25754    pub const ENCODED_LEN: usize = 32usize;
25755    pub const DEFAULT: Self = Self {
25756        time_usec: 0_u64,
25757        altitude_monotonic: 0.0_f32,
25758        altitude_amsl: 0.0_f32,
25759        altitude_local: 0.0_f32,
25760        altitude_relative: 0.0_f32,
25761        altitude_terrain: 0.0_f32,
25762        bottom_clearance: 0.0_f32,
25763    };
25764    #[cfg(feature = "arbitrary")]
25765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25766        use arbitrary::{Arbitrary, Unstructured};
25767        let mut buf = [0u8; 1024];
25768        rng.fill_bytes(&mut buf);
25769        let mut unstructured = Unstructured::new(&buf);
25770        Self::arbitrary(&mut unstructured).unwrap_or_default()
25771    }
25772}
25773impl Default for ALTITUDE_DATA {
25774    fn default() -> Self {
25775        Self::DEFAULT.clone()
25776    }
25777}
25778impl MessageData for ALTITUDE_DATA {
25779    type Message = MavMessage;
25780    const ID: u32 = 141u32;
25781    const NAME: &'static str = "ALTITUDE";
25782    const EXTRA_CRC: u8 = 47u8;
25783    const ENCODED_LEN: usize = 32usize;
25784    fn deser(
25785        _version: MavlinkVersion,
25786        __input: &[u8],
25787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25788        let avail_len = __input.len();
25789        let mut payload_buf = [0; Self::ENCODED_LEN];
25790        let mut buf = if avail_len < Self::ENCODED_LEN {
25791            payload_buf[0..avail_len].copy_from_slice(__input);
25792            Bytes::new(&payload_buf)
25793        } else {
25794            Bytes::new(__input)
25795        };
25796        let mut __struct = Self::default();
25797        __struct.time_usec = buf.get_u64_le();
25798        __struct.altitude_monotonic = buf.get_f32_le();
25799        __struct.altitude_amsl = buf.get_f32_le();
25800        __struct.altitude_local = buf.get_f32_le();
25801        __struct.altitude_relative = buf.get_f32_le();
25802        __struct.altitude_terrain = buf.get_f32_le();
25803        __struct.bottom_clearance = buf.get_f32_le();
25804        Ok(__struct)
25805    }
25806    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25807        let mut __tmp = BytesMut::new(bytes);
25808        #[allow(clippy::absurd_extreme_comparisons)]
25809        #[allow(unused_comparisons)]
25810        if __tmp.remaining() < Self::ENCODED_LEN {
25811            panic!(
25812                "buffer is too small (need {} bytes, but got {})",
25813                Self::ENCODED_LEN,
25814                __tmp.remaining(),
25815            )
25816        }
25817        __tmp.put_u64_le(self.time_usec);
25818        __tmp.put_f32_le(self.altitude_monotonic);
25819        __tmp.put_f32_le(self.altitude_amsl);
25820        __tmp.put_f32_le(self.altitude_local);
25821        __tmp.put_f32_le(self.altitude_relative);
25822        __tmp.put_f32_le(self.altitude_terrain);
25823        __tmp.put_f32_le(self.bottom_clearance);
25824        if matches!(version, MavlinkVersion::V2) {
25825            let len = __tmp.len();
25826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25827        } else {
25828            __tmp.len()
25829        }
25830    }
25831}
25832#[doc = "id: 117"]
25833#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
25834#[derive(Debug, Clone, PartialEq)]
25835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25837pub struct LOG_REQUEST_LIST_DATA {
25838    #[doc = "First log id (0 for first available)"]
25839    pub start: u16,
25840    #[doc = "Last log id (0xffff for last available)"]
25841    pub end: u16,
25842    #[doc = "System ID"]
25843    pub target_system: u8,
25844    #[doc = "Component ID"]
25845    pub target_component: u8,
25846}
25847impl LOG_REQUEST_LIST_DATA {
25848    pub const ENCODED_LEN: usize = 6usize;
25849    pub const DEFAULT: Self = Self {
25850        start: 0_u16,
25851        end: 0_u16,
25852        target_system: 0_u8,
25853        target_component: 0_u8,
25854    };
25855    #[cfg(feature = "arbitrary")]
25856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25857        use arbitrary::{Arbitrary, Unstructured};
25858        let mut buf = [0u8; 1024];
25859        rng.fill_bytes(&mut buf);
25860        let mut unstructured = Unstructured::new(&buf);
25861        Self::arbitrary(&mut unstructured).unwrap_or_default()
25862    }
25863}
25864impl Default for LOG_REQUEST_LIST_DATA {
25865    fn default() -> Self {
25866        Self::DEFAULT.clone()
25867    }
25868}
25869impl MessageData for LOG_REQUEST_LIST_DATA {
25870    type Message = MavMessage;
25871    const ID: u32 = 117u32;
25872    const NAME: &'static str = "LOG_REQUEST_LIST";
25873    const EXTRA_CRC: u8 = 128u8;
25874    const ENCODED_LEN: usize = 6usize;
25875    fn deser(
25876        _version: MavlinkVersion,
25877        __input: &[u8],
25878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25879        let avail_len = __input.len();
25880        let mut payload_buf = [0; Self::ENCODED_LEN];
25881        let mut buf = if avail_len < Self::ENCODED_LEN {
25882            payload_buf[0..avail_len].copy_from_slice(__input);
25883            Bytes::new(&payload_buf)
25884        } else {
25885            Bytes::new(__input)
25886        };
25887        let mut __struct = Self::default();
25888        __struct.start = buf.get_u16_le();
25889        __struct.end = buf.get_u16_le();
25890        __struct.target_system = buf.get_u8();
25891        __struct.target_component = buf.get_u8();
25892        Ok(__struct)
25893    }
25894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25895        let mut __tmp = BytesMut::new(bytes);
25896        #[allow(clippy::absurd_extreme_comparisons)]
25897        #[allow(unused_comparisons)]
25898        if __tmp.remaining() < Self::ENCODED_LEN {
25899            panic!(
25900                "buffer is too small (need {} bytes, but got {})",
25901                Self::ENCODED_LEN,
25902                __tmp.remaining(),
25903            )
25904        }
25905        __tmp.put_u16_le(self.start);
25906        __tmp.put_u16_le(self.end);
25907        __tmp.put_u8(self.target_system);
25908        __tmp.put_u8(self.target_component);
25909        if matches!(version, MavlinkVersion::V2) {
25910            let len = __tmp.len();
25911            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25912        } else {
25913            __tmp.len()
25914        }
25915    }
25916}
25917#[doc = "id: 118"]
25918#[doc = "Reply to LOG_REQUEST_LIST."]
25919#[derive(Debug, Clone, PartialEq)]
25920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25922pub struct LOG_ENTRY_DATA {
25923    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
25924    pub time_utc: u32,
25925    #[doc = "Size of the log (may be approximate)"]
25926    pub size: u32,
25927    #[doc = "Log id"]
25928    pub id: u16,
25929    #[doc = "Total number of logs"]
25930    pub num_logs: u16,
25931    #[doc = "High log number"]
25932    pub last_log_num: u16,
25933}
25934impl LOG_ENTRY_DATA {
25935    pub const ENCODED_LEN: usize = 14usize;
25936    pub const DEFAULT: Self = Self {
25937        time_utc: 0_u32,
25938        size: 0_u32,
25939        id: 0_u16,
25940        num_logs: 0_u16,
25941        last_log_num: 0_u16,
25942    };
25943    #[cfg(feature = "arbitrary")]
25944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25945        use arbitrary::{Arbitrary, Unstructured};
25946        let mut buf = [0u8; 1024];
25947        rng.fill_bytes(&mut buf);
25948        let mut unstructured = Unstructured::new(&buf);
25949        Self::arbitrary(&mut unstructured).unwrap_or_default()
25950    }
25951}
25952impl Default for LOG_ENTRY_DATA {
25953    fn default() -> Self {
25954        Self::DEFAULT.clone()
25955    }
25956}
25957impl MessageData for LOG_ENTRY_DATA {
25958    type Message = MavMessage;
25959    const ID: u32 = 118u32;
25960    const NAME: &'static str = "LOG_ENTRY";
25961    const EXTRA_CRC: u8 = 56u8;
25962    const ENCODED_LEN: usize = 14usize;
25963    fn deser(
25964        _version: MavlinkVersion,
25965        __input: &[u8],
25966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25967        let avail_len = __input.len();
25968        let mut payload_buf = [0; Self::ENCODED_LEN];
25969        let mut buf = if avail_len < Self::ENCODED_LEN {
25970            payload_buf[0..avail_len].copy_from_slice(__input);
25971            Bytes::new(&payload_buf)
25972        } else {
25973            Bytes::new(__input)
25974        };
25975        let mut __struct = Self::default();
25976        __struct.time_utc = buf.get_u32_le();
25977        __struct.size = buf.get_u32_le();
25978        __struct.id = buf.get_u16_le();
25979        __struct.num_logs = buf.get_u16_le();
25980        __struct.last_log_num = buf.get_u16_le();
25981        Ok(__struct)
25982    }
25983    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25984        let mut __tmp = BytesMut::new(bytes);
25985        #[allow(clippy::absurd_extreme_comparisons)]
25986        #[allow(unused_comparisons)]
25987        if __tmp.remaining() < Self::ENCODED_LEN {
25988            panic!(
25989                "buffer is too small (need {} bytes, but got {})",
25990                Self::ENCODED_LEN,
25991                __tmp.remaining(),
25992            )
25993        }
25994        __tmp.put_u32_le(self.time_utc);
25995        __tmp.put_u32_le(self.size);
25996        __tmp.put_u16_le(self.id);
25997        __tmp.put_u16_le(self.num_logs);
25998        __tmp.put_u16_le(self.last_log_num);
25999        if matches!(version, MavlinkVersion::V2) {
26000            let len = __tmp.len();
26001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26002        } else {
26003            __tmp.len()
26004        }
26005    }
26006}
26007#[doc = "id: 86"]
26008#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
26009#[derive(Debug, Clone, PartialEq)]
26010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26012pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
26013    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
26014    pub time_boot_ms: u32,
26015    #[doc = "Latitude in WGS84 frame"]
26016    pub lat_int: i32,
26017    #[doc = "Longitude in WGS84 frame"]
26018    pub lon_int: i32,
26019    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
26020    pub alt: f32,
26021    #[doc = "X velocity in NED frame"]
26022    pub vx: f32,
26023    #[doc = "Y velocity in NED frame"]
26024    pub vy: f32,
26025    #[doc = "Z velocity in NED frame"]
26026    pub vz: f32,
26027    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26028    pub afx: f32,
26029    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26030    pub afy: f32,
26031    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
26032    pub afz: f32,
26033    #[doc = "yaw setpoint"]
26034    pub yaw: f32,
26035    #[doc = "yaw rate setpoint"]
26036    pub yaw_rate: f32,
26037    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26038    pub type_mask: PositionTargetTypemask,
26039    #[doc = "System ID"]
26040    pub target_system: u8,
26041    #[doc = "Component ID"]
26042    pub target_component: u8,
26043    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
26044    pub coordinate_frame: MavFrame,
26045}
26046impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
26047    pub const ENCODED_LEN: usize = 53usize;
26048    pub const DEFAULT: Self = Self {
26049        time_boot_ms: 0_u32,
26050        lat_int: 0_i32,
26051        lon_int: 0_i32,
26052        alt: 0.0_f32,
26053        vx: 0.0_f32,
26054        vy: 0.0_f32,
26055        vz: 0.0_f32,
26056        afx: 0.0_f32,
26057        afy: 0.0_f32,
26058        afz: 0.0_f32,
26059        yaw: 0.0_f32,
26060        yaw_rate: 0.0_f32,
26061        type_mask: PositionTargetTypemask::DEFAULT,
26062        target_system: 0_u8,
26063        target_component: 0_u8,
26064        coordinate_frame: MavFrame::DEFAULT,
26065    };
26066    #[cfg(feature = "arbitrary")]
26067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26068        use arbitrary::{Arbitrary, Unstructured};
26069        let mut buf = [0u8; 1024];
26070        rng.fill_bytes(&mut buf);
26071        let mut unstructured = Unstructured::new(&buf);
26072        Self::arbitrary(&mut unstructured).unwrap_or_default()
26073    }
26074}
26075impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
26076    fn default() -> Self {
26077        Self::DEFAULT.clone()
26078    }
26079}
26080impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
26081    type Message = MavMessage;
26082    const ID: u32 = 86u32;
26083    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
26084    const EXTRA_CRC: u8 = 5u8;
26085    const ENCODED_LEN: usize = 53usize;
26086    fn deser(
26087        _version: MavlinkVersion,
26088        __input: &[u8],
26089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26090        let avail_len = __input.len();
26091        let mut payload_buf = [0; Self::ENCODED_LEN];
26092        let mut buf = if avail_len < Self::ENCODED_LEN {
26093            payload_buf[0..avail_len].copy_from_slice(__input);
26094            Bytes::new(&payload_buf)
26095        } else {
26096            Bytes::new(__input)
26097        };
26098        let mut __struct = Self::default();
26099        __struct.time_boot_ms = buf.get_u32_le();
26100        __struct.lat_int = buf.get_i32_le();
26101        __struct.lon_int = buf.get_i32_le();
26102        __struct.alt = buf.get_f32_le();
26103        __struct.vx = buf.get_f32_le();
26104        __struct.vy = buf.get_f32_le();
26105        __struct.vz = buf.get_f32_le();
26106        __struct.afx = buf.get_f32_le();
26107        __struct.afy = buf.get_f32_le();
26108        __struct.afz = buf.get_f32_le();
26109        __struct.yaw = buf.get_f32_le();
26110        __struct.yaw_rate = buf.get_f32_le();
26111        let tmp = buf.get_u16_le();
26112        __struct.type_mask = PositionTargetTypemask::from_bits(
26113            tmp & PositionTargetTypemask::all().bits(),
26114        )
26115        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26116            flag_type: "PositionTargetTypemask",
26117            value: tmp as u32,
26118        })?;
26119        __struct.target_system = buf.get_u8();
26120        __struct.target_component = buf.get_u8();
26121        let tmp = buf.get_u8();
26122        __struct.coordinate_frame =
26123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26124                enum_type: "MavFrame",
26125                value: tmp as u32,
26126            })?;
26127        Ok(__struct)
26128    }
26129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26130        let mut __tmp = BytesMut::new(bytes);
26131        #[allow(clippy::absurd_extreme_comparisons)]
26132        #[allow(unused_comparisons)]
26133        if __tmp.remaining() < Self::ENCODED_LEN {
26134            panic!(
26135                "buffer is too small (need {} bytes, but got {})",
26136                Self::ENCODED_LEN,
26137                __tmp.remaining(),
26138            )
26139        }
26140        __tmp.put_u32_le(self.time_boot_ms);
26141        __tmp.put_i32_le(self.lat_int);
26142        __tmp.put_i32_le(self.lon_int);
26143        __tmp.put_f32_le(self.alt);
26144        __tmp.put_f32_le(self.vx);
26145        __tmp.put_f32_le(self.vy);
26146        __tmp.put_f32_le(self.vz);
26147        __tmp.put_f32_le(self.afx);
26148        __tmp.put_f32_le(self.afy);
26149        __tmp.put_f32_le(self.afz);
26150        __tmp.put_f32_le(self.yaw);
26151        __tmp.put_f32_le(self.yaw_rate);
26152        __tmp.put_u16_le(self.type_mask.bits());
26153        __tmp.put_u8(self.target_system);
26154        __tmp.put_u8(self.target_component);
26155        __tmp.put_u8(self.coordinate_frame as u8);
26156        if matches!(version, MavlinkVersion::V2) {
26157            let len = __tmp.len();
26158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26159        } else {
26160            __tmp.len()
26161        }
26162    }
26163}
26164#[doc = "id: 89"]
26165#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
26166#[derive(Debug, Clone, PartialEq)]
26167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26169pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
26170    #[doc = "Timestamp (time since system boot)."]
26171    pub time_boot_ms: u32,
26172    #[doc = "X Position"]
26173    pub x: f32,
26174    #[doc = "Y Position"]
26175    pub y: f32,
26176    #[doc = "Z Position"]
26177    pub z: f32,
26178    #[doc = "Roll"]
26179    pub roll: f32,
26180    #[doc = "Pitch"]
26181    pub pitch: f32,
26182    #[doc = "Yaw"]
26183    pub yaw: f32,
26184}
26185impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
26186    pub const ENCODED_LEN: usize = 28usize;
26187    pub const DEFAULT: Self = Self {
26188        time_boot_ms: 0_u32,
26189        x: 0.0_f32,
26190        y: 0.0_f32,
26191        z: 0.0_f32,
26192        roll: 0.0_f32,
26193        pitch: 0.0_f32,
26194        yaw: 0.0_f32,
26195    };
26196    #[cfg(feature = "arbitrary")]
26197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26198        use arbitrary::{Arbitrary, Unstructured};
26199        let mut buf = [0u8; 1024];
26200        rng.fill_bytes(&mut buf);
26201        let mut unstructured = Unstructured::new(&buf);
26202        Self::arbitrary(&mut unstructured).unwrap_or_default()
26203    }
26204}
26205impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
26206    fn default() -> Self {
26207        Self::DEFAULT.clone()
26208    }
26209}
26210impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
26211    type Message = MavMessage;
26212    const ID: u32 = 89u32;
26213    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
26214    const EXTRA_CRC: u8 = 231u8;
26215    const ENCODED_LEN: usize = 28usize;
26216    fn deser(
26217        _version: MavlinkVersion,
26218        __input: &[u8],
26219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26220        let avail_len = __input.len();
26221        let mut payload_buf = [0; Self::ENCODED_LEN];
26222        let mut buf = if avail_len < Self::ENCODED_LEN {
26223            payload_buf[0..avail_len].copy_from_slice(__input);
26224            Bytes::new(&payload_buf)
26225        } else {
26226            Bytes::new(__input)
26227        };
26228        let mut __struct = Self::default();
26229        __struct.time_boot_ms = buf.get_u32_le();
26230        __struct.x = buf.get_f32_le();
26231        __struct.y = buf.get_f32_le();
26232        __struct.z = buf.get_f32_le();
26233        __struct.roll = buf.get_f32_le();
26234        __struct.pitch = buf.get_f32_le();
26235        __struct.yaw = buf.get_f32_le();
26236        Ok(__struct)
26237    }
26238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26239        let mut __tmp = BytesMut::new(bytes);
26240        #[allow(clippy::absurd_extreme_comparisons)]
26241        #[allow(unused_comparisons)]
26242        if __tmp.remaining() < Self::ENCODED_LEN {
26243            panic!(
26244                "buffer is too small (need {} bytes, but got {})",
26245                Self::ENCODED_LEN,
26246                __tmp.remaining(),
26247            )
26248        }
26249        __tmp.put_u32_le(self.time_boot_ms);
26250        __tmp.put_f32_le(self.x);
26251        __tmp.put_f32_le(self.y);
26252        __tmp.put_f32_le(self.z);
26253        __tmp.put_f32_le(self.roll);
26254        __tmp.put_f32_le(self.pitch);
26255        __tmp.put_f32_le(self.yaw);
26256        if matches!(version, MavlinkVersion::V2) {
26257            let len = __tmp.len();
26258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26259        } else {
26260            __tmp.len()
26261        }
26262    }
26263}
26264#[doc = "id: 46"]
26265#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
26266#[derive(Debug, Clone, PartialEq)]
26267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26269pub struct MISSION_ITEM_REACHED_DATA {
26270    #[doc = "Sequence"]
26271    pub seq: u16,
26272}
26273impl MISSION_ITEM_REACHED_DATA {
26274    pub const ENCODED_LEN: usize = 2usize;
26275    pub const DEFAULT: Self = Self { seq: 0_u16 };
26276    #[cfg(feature = "arbitrary")]
26277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26278        use arbitrary::{Arbitrary, Unstructured};
26279        let mut buf = [0u8; 1024];
26280        rng.fill_bytes(&mut buf);
26281        let mut unstructured = Unstructured::new(&buf);
26282        Self::arbitrary(&mut unstructured).unwrap_or_default()
26283    }
26284}
26285impl Default for MISSION_ITEM_REACHED_DATA {
26286    fn default() -> Self {
26287        Self::DEFAULT.clone()
26288    }
26289}
26290impl MessageData for MISSION_ITEM_REACHED_DATA {
26291    type Message = MavMessage;
26292    const ID: u32 = 46u32;
26293    const NAME: &'static str = "MISSION_ITEM_REACHED";
26294    const EXTRA_CRC: u8 = 11u8;
26295    const ENCODED_LEN: usize = 2usize;
26296    fn deser(
26297        _version: MavlinkVersion,
26298        __input: &[u8],
26299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26300        let avail_len = __input.len();
26301        let mut payload_buf = [0; Self::ENCODED_LEN];
26302        let mut buf = if avail_len < Self::ENCODED_LEN {
26303            payload_buf[0..avail_len].copy_from_slice(__input);
26304            Bytes::new(&payload_buf)
26305        } else {
26306            Bytes::new(__input)
26307        };
26308        let mut __struct = Self::default();
26309        __struct.seq = buf.get_u16_le();
26310        Ok(__struct)
26311    }
26312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26313        let mut __tmp = BytesMut::new(bytes);
26314        #[allow(clippy::absurd_extreme_comparisons)]
26315        #[allow(unused_comparisons)]
26316        if __tmp.remaining() < Self::ENCODED_LEN {
26317            panic!(
26318                "buffer is too small (need {} bytes, but got {})",
26319                Self::ENCODED_LEN,
26320                __tmp.remaining(),
26321            )
26322        }
26323        __tmp.put_u16_le(self.seq);
26324        if matches!(version, MavlinkVersion::V2) {
26325            let len = __tmp.len();
26326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26327        } else {
26328            __tmp.len()
26329        }
26330    }
26331}
26332#[doc = "id: 67"]
26333#[doc = "Data stream status information."]
26334#[derive(Debug, Clone, PartialEq)]
26335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26337pub struct DATA_STREAM_DATA {
26338    #[doc = "The message rate"]
26339    pub message_rate: u16,
26340    #[doc = "The ID of the requested data stream"]
26341    pub stream_id: u8,
26342    #[doc = "1 stream is enabled, 0 stream is stopped."]
26343    pub on_off: u8,
26344}
26345impl DATA_STREAM_DATA {
26346    pub const ENCODED_LEN: usize = 4usize;
26347    pub const DEFAULT: Self = Self {
26348        message_rate: 0_u16,
26349        stream_id: 0_u8,
26350        on_off: 0_u8,
26351    };
26352    #[cfg(feature = "arbitrary")]
26353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26354        use arbitrary::{Arbitrary, Unstructured};
26355        let mut buf = [0u8; 1024];
26356        rng.fill_bytes(&mut buf);
26357        let mut unstructured = Unstructured::new(&buf);
26358        Self::arbitrary(&mut unstructured).unwrap_or_default()
26359    }
26360}
26361impl Default for DATA_STREAM_DATA {
26362    fn default() -> Self {
26363        Self::DEFAULT.clone()
26364    }
26365}
26366impl MessageData for DATA_STREAM_DATA {
26367    type Message = MavMessage;
26368    const ID: u32 = 67u32;
26369    const NAME: &'static str = "DATA_STREAM";
26370    const EXTRA_CRC: u8 = 21u8;
26371    const ENCODED_LEN: usize = 4usize;
26372    fn deser(
26373        _version: MavlinkVersion,
26374        __input: &[u8],
26375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26376        let avail_len = __input.len();
26377        let mut payload_buf = [0; Self::ENCODED_LEN];
26378        let mut buf = if avail_len < Self::ENCODED_LEN {
26379            payload_buf[0..avail_len].copy_from_slice(__input);
26380            Bytes::new(&payload_buf)
26381        } else {
26382            Bytes::new(__input)
26383        };
26384        let mut __struct = Self::default();
26385        __struct.message_rate = buf.get_u16_le();
26386        __struct.stream_id = buf.get_u8();
26387        __struct.on_off = buf.get_u8();
26388        Ok(__struct)
26389    }
26390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26391        let mut __tmp = BytesMut::new(bytes);
26392        #[allow(clippy::absurd_extreme_comparisons)]
26393        #[allow(unused_comparisons)]
26394        if __tmp.remaining() < Self::ENCODED_LEN {
26395            panic!(
26396                "buffer is too small (need {} bytes, but got {})",
26397                Self::ENCODED_LEN,
26398                __tmp.remaining(),
26399            )
26400        }
26401        __tmp.put_u16_le(self.message_rate);
26402        __tmp.put_u8(self.stream_id);
26403        __tmp.put_u8(self.on_off);
26404        if matches!(version, MavlinkVersion::V2) {
26405            let len = __tmp.len();
26406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26407        } else {
26408            __tmp.len()
26409        }
26410    }
26411}
26412#[doc = "id: 44"]
26413#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
26414#[derive(Debug, Clone, PartialEq)]
26415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26417pub struct MISSION_COUNT_DATA {
26418    #[doc = "Number of mission items in the sequence"]
26419    pub count: u16,
26420    #[doc = "System ID"]
26421    pub target_system: u8,
26422    #[doc = "Component ID"]
26423    pub target_component: u8,
26424    #[doc = "Mission type."]
26425    #[cfg_attr(feature = "serde", serde(default))]
26426    pub mission_type: MavMissionType,
26427    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
26428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26429    pub opaque_id: u32,
26430}
26431impl MISSION_COUNT_DATA {
26432    pub const ENCODED_LEN: usize = 9usize;
26433    pub const DEFAULT: Self = Self {
26434        count: 0_u16,
26435        target_system: 0_u8,
26436        target_component: 0_u8,
26437        mission_type: MavMissionType::DEFAULT,
26438        opaque_id: 0_u32,
26439    };
26440    #[cfg(feature = "arbitrary")]
26441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26442        use arbitrary::{Arbitrary, Unstructured};
26443        let mut buf = [0u8; 1024];
26444        rng.fill_bytes(&mut buf);
26445        let mut unstructured = Unstructured::new(&buf);
26446        Self::arbitrary(&mut unstructured).unwrap_or_default()
26447    }
26448}
26449impl Default for MISSION_COUNT_DATA {
26450    fn default() -> Self {
26451        Self::DEFAULT.clone()
26452    }
26453}
26454impl MessageData for MISSION_COUNT_DATA {
26455    type Message = MavMessage;
26456    const ID: u32 = 44u32;
26457    const NAME: &'static str = "MISSION_COUNT";
26458    const EXTRA_CRC: u8 = 221u8;
26459    const ENCODED_LEN: usize = 9usize;
26460    fn deser(
26461        _version: MavlinkVersion,
26462        __input: &[u8],
26463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26464        let avail_len = __input.len();
26465        let mut payload_buf = [0; Self::ENCODED_LEN];
26466        let mut buf = if avail_len < Self::ENCODED_LEN {
26467            payload_buf[0..avail_len].copy_from_slice(__input);
26468            Bytes::new(&payload_buf)
26469        } else {
26470            Bytes::new(__input)
26471        };
26472        let mut __struct = Self::default();
26473        __struct.count = buf.get_u16_le();
26474        __struct.target_system = buf.get_u8();
26475        __struct.target_component = buf.get_u8();
26476        let tmp = buf.get_u8();
26477        __struct.mission_type =
26478            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26479                enum_type: "MavMissionType",
26480                value: tmp as u32,
26481            })?;
26482        __struct.opaque_id = buf.get_u32_le();
26483        Ok(__struct)
26484    }
26485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26486        let mut __tmp = BytesMut::new(bytes);
26487        #[allow(clippy::absurd_extreme_comparisons)]
26488        #[allow(unused_comparisons)]
26489        if __tmp.remaining() < Self::ENCODED_LEN {
26490            panic!(
26491                "buffer is too small (need {} bytes, but got {})",
26492                Self::ENCODED_LEN,
26493                __tmp.remaining(),
26494            )
26495        }
26496        __tmp.put_u16_le(self.count);
26497        __tmp.put_u8(self.target_system);
26498        __tmp.put_u8(self.target_component);
26499        __tmp.put_u8(self.mission_type as u8);
26500        __tmp.put_u32_le(self.opaque_id);
26501        if matches!(version, MavlinkVersion::V2) {
26502            let len = __tmp.len();
26503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26504        } else {
26505            __tmp.len()
26506        }
26507    }
26508}
26509#[doc = "id: 146"]
26510#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
26511#[derive(Debug, Clone, PartialEq)]
26512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26513#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26514pub struct CONTROL_SYSTEM_STATE_DATA {
26515    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26516    pub time_usec: u64,
26517    #[doc = "X acceleration in body frame"]
26518    pub x_acc: f32,
26519    #[doc = "Y acceleration in body frame"]
26520    pub y_acc: f32,
26521    #[doc = "Z acceleration in body frame"]
26522    pub z_acc: f32,
26523    #[doc = "X velocity in body frame"]
26524    pub x_vel: f32,
26525    #[doc = "Y velocity in body frame"]
26526    pub y_vel: f32,
26527    #[doc = "Z velocity in body frame"]
26528    pub z_vel: f32,
26529    #[doc = "X position in local frame"]
26530    pub x_pos: f32,
26531    #[doc = "Y position in local frame"]
26532    pub y_pos: f32,
26533    #[doc = "Z position in local frame"]
26534    pub z_pos: f32,
26535    #[doc = "Airspeed, set to -1 if unknown"]
26536    pub airspeed: f32,
26537    #[doc = "Variance of body velocity estimate"]
26538    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26539    pub vel_variance: [f32; 3],
26540    #[doc = "Variance in local position"]
26541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26542    pub pos_variance: [f32; 3],
26543    #[doc = "The attitude, represented as Quaternion"]
26544    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26545    pub q: [f32; 4],
26546    #[doc = "Angular rate in roll axis"]
26547    pub roll_rate: f32,
26548    #[doc = "Angular rate in pitch axis"]
26549    pub pitch_rate: f32,
26550    #[doc = "Angular rate in yaw axis"]
26551    pub yaw_rate: f32,
26552}
26553impl CONTROL_SYSTEM_STATE_DATA {
26554    pub const ENCODED_LEN: usize = 100usize;
26555    pub const DEFAULT: Self = Self {
26556        time_usec: 0_u64,
26557        x_acc: 0.0_f32,
26558        y_acc: 0.0_f32,
26559        z_acc: 0.0_f32,
26560        x_vel: 0.0_f32,
26561        y_vel: 0.0_f32,
26562        z_vel: 0.0_f32,
26563        x_pos: 0.0_f32,
26564        y_pos: 0.0_f32,
26565        z_pos: 0.0_f32,
26566        airspeed: 0.0_f32,
26567        vel_variance: [0.0_f32; 3usize],
26568        pos_variance: [0.0_f32; 3usize],
26569        q: [0.0_f32; 4usize],
26570        roll_rate: 0.0_f32,
26571        pitch_rate: 0.0_f32,
26572        yaw_rate: 0.0_f32,
26573    };
26574    #[cfg(feature = "arbitrary")]
26575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26576        use arbitrary::{Arbitrary, Unstructured};
26577        let mut buf = [0u8; 1024];
26578        rng.fill_bytes(&mut buf);
26579        let mut unstructured = Unstructured::new(&buf);
26580        Self::arbitrary(&mut unstructured).unwrap_or_default()
26581    }
26582}
26583impl Default for CONTROL_SYSTEM_STATE_DATA {
26584    fn default() -> Self {
26585        Self::DEFAULT.clone()
26586    }
26587}
26588impl MessageData for CONTROL_SYSTEM_STATE_DATA {
26589    type Message = MavMessage;
26590    const ID: u32 = 146u32;
26591    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
26592    const EXTRA_CRC: u8 = 103u8;
26593    const ENCODED_LEN: usize = 100usize;
26594    fn deser(
26595        _version: MavlinkVersion,
26596        __input: &[u8],
26597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26598        let avail_len = __input.len();
26599        let mut payload_buf = [0; Self::ENCODED_LEN];
26600        let mut buf = if avail_len < Self::ENCODED_LEN {
26601            payload_buf[0..avail_len].copy_from_slice(__input);
26602            Bytes::new(&payload_buf)
26603        } else {
26604            Bytes::new(__input)
26605        };
26606        let mut __struct = Self::default();
26607        __struct.time_usec = buf.get_u64_le();
26608        __struct.x_acc = buf.get_f32_le();
26609        __struct.y_acc = buf.get_f32_le();
26610        __struct.z_acc = buf.get_f32_le();
26611        __struct.x_vel = buf.get_f32_le();
26612        __struct.y_vel = buf.get_f32_le();
26613        __struct.z_vel = buf.get_f32_le();
26614        __struct.x_pos = buf.get_f32_le();
26615        __struct.y_pos = buf.get_f32_le();
26616        __struct.z_pos = buf.get_f32_le();
26617        __struct.airspeed = buf.get_f32_le();
26618        for v in &mut __struct.vel_variance {
26619            let val = buf.get_f32_le();
26620            *v = val;
26621        }
26622        for v in &mut __struct.pos_variance {
26623            let val = buf.get_f32_le();
26624            *v = val;
26625        }
26626        for v in &mut __struct.q {
26627            let val = buf.get_f32_le();
26628            *v = val;
26629        }
26630        __struct.roll_rate = buf.get_f32_le();
26631        __struct.pitch_rate = buf.get_f32_le();
26632        __struct.yaw_rate = buf.get_f32_le();
26633        Ok(__struct)
26634    }
26635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26636        let mut __tmp = BytesMut::new(bytes);
26637        #[allow(clippy::absurd_extreme_comparisons)]
26638        #[allow(unused_comparisons)]
26639        if __tmp.remaining() < Self::ENCODED_LEN {
26640            panic!(
26641                "buffer is too small (need {} bytes, but got {})",
26642                Self::ENCODED_LEN,
26643                __tmp.remaining(),
26644            )
26645        }
26646        __tmp.put_u64_le(self.time_usec);
26647        __tmp.put_f32_le(self.x_acc);
26648        __tmp.put_f32_le(self.y_acc);
26649        __tmp.put_f32_le(self.z_acc);
26650        __tmp.put_f32_le(self.x_vel);
26651        __tmp.put_f32_le(self.y_vel);
26652        __tmp.put_f32_le(self.z_vel);
26653        __tmp.put_f32_le(self.x_pos);
26654        __tmp.put_f32_le(self.y_pos);
26655        __tmp.put_f32_le(self.z_pos);
26656        __tmp.put_f32_le(self.airspeed);
26657        for val in &self.vel_variance {
26658            __tmp.put_f32_le(*val);
26659        }
26660        for val in &self.pos_variance {
26661            __tmp.put_f32_le(*val);
26662        }
26663        for val in &self.q {
26664            __tmp.put_f32_le(*val);
26665        }
26666        __tmp.put_f32_le(self.roll_rate);
26667        __tmp.put_f32_le(self.pitch_rate);
26668        __tmp.put_f32_le(self.yaw_rate);
26669        if matches!(version, MavlinkVersion::V2) {
26670            let len = __tmp.len();
26671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26672        } else {
26673            __tmp.len()
26674        }
26675    }
26676}
26677#[doc = "id: 253"]
26678#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
26679#[derive(Debug, Clone, PartialEq)]
26680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26682pub struct STATUSTEXT_DATA {
26683    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
26684    pub severity: MavSeverity,
26685    #[doc = "Status text message, without null termination character"]
26686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26687    pub text: [u8; 50],
26688    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
26689    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26690    pub id: u16,
26691    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
26692    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26693    pub chunk_seq: u8,
26694}
26695impl STATUSTEXT_DATA {
26696    pub const ENCODED_LEN: usize = 54usize;
26697    pub const DEFAULT: Self = Self {
26698        severity: MavSeverity::DEFAULT,
26699        text: [0_u8; 50usize],
26700        id: 0_u16,
26701        chunk_seq: 0_u8,
26702    };
26703    #[cfg(feature = "arbitrary")]
26704    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26705        use arbitrary::{Arbitrary, Unstructured};
26706        let mut buf = [0u8; 1024];
26707        rng.fill_bytes(&mut buf);
26708        let mut unstructured = Unstructured::new(&buf);
26709        Self::arbitrary(&mut unstructured).unwrap_or_default()
26710    }
26711}
26712impl Default for STATUSTEXT_DATA {
26713    fn default() -> Self {
26714        Self::DEFAULT.clone()
26715    }
26716}
26717impl MessageData for STATUSTEXT_DATA {
26718    type Message = MavMessage;
26719    const ID: u32 = 253u32;
26720    const NAME: &'static str = "STATUSTEXT";
26721    const EXTRA_CRC: u8 = 83u8;
26722    const ENCODED_LEN: usize = 54usize;
26723    fn deser(
26724        _version: MavlinkVersion,
26725        __input: &[u8],
26726    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26727        let avail_len = __input.len();
26728        let mut payload_buf = [0; Self::ENCODED_LEN];
26729        let mut buf = if avail_len < Self::ENCODED_LEN {
26730            payload_buf[0..avail_len].copy_from_slice(__input);
26731            Bytes::new(&payload_buf)
26732        } else {
26733            Bytes::new(__input)
26734        };
26735        let mut __struct = Self::default();
26736        let tmp = buf.get_u8();
26737        __struct.severity =
26738            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26739                enum_type: "MavSeverity",
26740                value: tmp as u32,
26741            })?;
26742        for v in &mut __struct.text {
26743            let val = buf.get_u8();
26744            *v = val;
26745        }
26746        __struct.id = buf.get_u16_le();
26747        __struct.chunk_seq = buf.get_u8();
26748        Ok(__struct)
26749    }
26750    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26751        let mut __tmp = BytesMut::new(bytes);
26752        #[allow(clippy::absurd_extreme_comparisons)]
26753        #[allow(unused_comparisons)]
26754        if __tmp.remaining() < Self::ENCODED_LEN {
26755            panic!(
26756                "buffer is too small (need {} bytes, but got {})",
26757                Self::ENCODED_LEN,
26758                __tmp.remaining(),
26759            )
26760        }
26761        __tmp.put_u8(self.severity as u8);
26762        for val in &self.text {
26763            __tmp.put_u8(*val);
26764        }
26765        __tmp.put_u16_le(self.id);
26766        __tmp.put_u8(self.chunk_seq);
26767        if matches!(version, MavlinkVersion::V2) {
26768            let len = __tmp.len();
26769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26770        } else {
26771            __tmp.len()
26772        }
26773    }
26774}
26775#[doc = "id: 148"]
26776#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
26777#[derive(Debug, Clone, PartialEq)]
26778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26780pub struct AUTOPILOT_VERSION_DATA {
26781    #[doc = "Bitmap of capabilities"]
26782    pub capabilities: MavProtocolCapability,
26783    #[doc = "UID if provided by hardware (see uid2)"]
26784    pub uid: u64,
26785    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
26786    pub flight_sw_version: u32,
26787    #[doc = "Middleware version number"]
26788    pub middleware_sw_version: u32,
26789    #[doc = "Operating system version number"]
26790    pub os_sw_version: u32,
26791    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
26792    pub board_version: u32,
26793    #[doc = "ID of the board vendor"]
26794    pub vendor_id: u16,
26795    #[doc = "ID of the product"]
26796    pub product_id: u16,
26797    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
26798    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26799    pub flight_custom_version: [u8; 8],
26800    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
26801    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26802    pub middleware_custom_version: [u8; 8],
26803    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
26804    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26805    pub os_custom_version: [u8; 8],
26806    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
26807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26808    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26809    pub uid2: [u8; 18],
26810}
26811impl AUTOPILOT_VERSION_DATA {
26812    pub const ENCODED_LEN: usize = 78usize;
26813    pub const DEFAULT: Self = Self {
26814        capabilities: MavProtocolCapability::DEFAULT,
26815        uid: 0_u64,
26816        flight_sw_version: 0_u32,
26817        middleware_sw_version: 0_u32,
26818        os_sw_version: 0_u32,
26819        board_version: 0_u32,
26820        vendor_id: 0_u16,
26821        product_id: 0_u16,
26822        flight_custom_version: [0_u8; 8usize],
26823        middleware_custom_version: [0_u8; 8usize],
26824        os_custom_version: [0_u8; 8usize],
26825        uid2: [0_u8; 18usize],
26826    };
26827    #[cfg(feature = "arbitrary")]
26828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26829        use arbitrary::{Arbitrary, Unstructured};
26830        let mut buf = [0u8; 1024];
26831        rng.fill_bytes(&mut buf);
26832        let mut unstructured = Unstructured::new(&buf);
26833        Self::arbitrary(&mut unstructured).unwrap_or_default()
26834    }
26835}
26836impl Default for AUTOPILOT_VERSION_DATA {
26837    fn default() -> Self {
26838        Self::DEFAULT.clone()
26839    }
26840}
26841impl MessageData for AUTOPILOT_VERSION_DATA {
26842    type Message = MavMessage;
26843    const ID: u32 = 148u32;
26844    const NAME: &'static str = "AUTOPILOT_VERSION";
26845    const EXTRA_CRC: u8 = 178u8;
26846    const ENCODED_LEN: usize = 78usize;
26847    fn deser(
26848        _version: MavlinkVersion,
26849        __input: &[u8],
26850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26851        let avail_len = __input.len();
26852        let mut payload_buf = [0; Self::ENCODED_LEN];
26853        let mut buf = if avail_len < Self::ENCODED_LEN {
26854            payload_buf[0..avail_len].copy_from_slice(__input);
26855            Bytes::new(&payload_buf)
26856        } else {
26857            Bytes::new(__input)
26858        };
26859        let mut __struct = Self::default();
26860        let tmp = buf.get_u64_le();
26861        __struct.capabilities = MavProtocolCapability::from_bits(
26862            tmp & MavProtocolCapability::all().bits(),
26863        )
26864        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26865            flag_type: "MavProtocolCapability",
26866            value: tmp as u32,
26867        })?;
26868        __struct.uid = buf.get_u64_le();
26869        __struct.flight_sw_version = buf.get_u32_le();
26870        __struct.middleware_sw_version = buf.get_u32_le();
26871        __struct.os_sw_version = buf.get_u32_le();
26872        __struct.board_version = buf.get_u32_le();
26873        __struct.vendor_id = buf.get_u16_le();
26874        __struct.product_id = buf.get_u16_le();
26875        for v in &mut __struct.flight_custom_version {
26876            let val = buf.get_u8();
26877            *v = val;
26878        }
26879        for v in &mut __struct.middleware_custom_version {
26880            let val = buf.get_u8();
26881            *v = val;
26882        }
26883        for v in &mut __struct.os_custom_version {
26884            let val = buf.get_u8();
26885            *v = val;
26886        }
26887        for v in &mut __struct.uid2 {
26888            let val = buf.get_u8();
26889            *v = val;
26890        }
26891        Ok(__struct)
26892    }
26893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26894        let mut __tmp = BytesMut::new(bytes);
26895        #[allow(clippy::absurd_extreme_comparisons)]
26896        #[allow(unused_comparisons)]
26897        if __tmp.remaining() < Self::ENCODED_LEN {
26898            panic!(
26899                "buffer is too small (need {} bytes, but got {})",
26900                Self::ENCODED_LEN,
26901                __tmp.remaining(),
26902            )
26903        }
26904        __tmp.put_u64_le(self.capabilities.bits());
26905        __tmp.put_u64_le(self.uid);
26906        __tmp.put_u32_le(self.flight_sw_version);
26907        __tmp.put_u32_le(self.middleware_sw_version);
26908        __tmp.put_u32_le(self.os_sw_version);
26909        __tmp.put_u32_le(self.board_version);
26910        __tmp.put_u16_le(self.vendor_id);
26911        __tmp.put_u16_le(self.product_id);
26912        for val in &self.flight_custom_version {
26913            __tmp.put_u8(*val);
26914        }
26915        for val in &self.middleware_custom_version {
26916            __tmp.put_u8(*val);
26917        }
26918        for val in &self.os_custom_version {
26919            __tmp.put_u8(*val);
26920        }
26921        for val in &self.uid2 {
26922            __tmp.put_u8(*val);
26923        }
26924        if matches!(version, MavlinkVersion::V2) {
26925            let len = __tmp.len();
26926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26927        } else {
26928            __tmp.len()
26929        }
26930    }
26931}
26932#[doc = "id: 66"]
26933#[doc = "Request a data stream."]
26934#[derive(Debug, Clone, PartialEq)]
26935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26937pub struct REQUEST_DATA_STREAM_DATA {
26938    #[doc = "The requested message rate"]
26939    pub req_message_rate: u16,
26940    #[doc = "The target requested to send the message stream."]
26941    pub target_system: u8,
26942    #[doc = "The target requested to send the message stream."]
26943    pub target_component: u8,
26944    #[doc = "The ID of the requested data stream"]
26945    pub req_stream_id: u8,
26946    #[doc = "1 to start sending, 0 to stop sending."]
26947    pub start_stop: u8,
26948}
26949impl REQUEST_DATA_STREAM_DATA {
26950    pub const ENCODED_LEN: usize = 6usize;
26951    pub const DEFAULT: Self = Self {
26952        req_message_rate: 0_u16,
26953        target_system: 0_u8,
26954        target_component: 0_u8,
26955        req_stream_id: 0_u8,
26956        start_stop: 0_u8,
26957    };
26958    #[cfg(feature = "arbitrary")]
26959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26960        use arbitrary::{Arbitrary, Unstructured};
26961        let mut buf = [0u8; 1024];
26962        rng.fill_bytes(&mut buf);
26963        let mut unstructured = Unstructured::new(&buf);
26964        Self::arbitrary(&mut unstructured).unwrap_or_default()
26965    }
26966}
26967impl Default for REQUEST_DATA_STREAM_DATA {
26968    fn default() -> Self {
26969        Self::DEFAULT.clone()
26970    }
26971}
26972impl MessageData for REQUEST_DATA_STREAM_DATA {
26973    type Message = MavMessage;
26974    const ID: u32 = 66u32;
26975    const NAME: &'static str = "REQUEST_DATA_STREAM";
26976    const EXTRA_CRC: u8 = 148u8;
26977    const ENCODED_LEN: usize = 6usize;
26978    fn deser(
26979        _version: MavlinkVersion,
26980        __input: &[u8],
26981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26982        let avail_len = __input.len();
26983        let mut payload_buf = [0; Self::ENCODED_LEN];
26984        let mut buf = if avail_len < Self::ENCODED_LEN {
26985            payload_buf[0..avail_len].copy_from_slice(__input);
26986            Bytes::new(&payload_buf)
26987        } else {
26988            Bytes::new(__input)
26989        };
26990        let mut __struct = Self::default();
26991        __struct.req_message_rate = buf.get_u16_le();
26992        __struct.target_system = buf.get_u8();
26993        __struct.target_component = buf.get_u8();
26994        __struct.req_stream_id = buf.get_u8();
26995        __struct.start_stop = buf.get_u8();
26996        Ok(__struct)
26997    }
26998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26999        let mut __tmp = BytesMut::new(bytes);
27000        #[allow(clippy::absurd_extreme_comparisons)]
27001        #[allow(unused_comparisons)]
27002        if __tmp.remaining() < Self::ENCODED_LEN {
27003            panic!(
27004                "buffer is too small (need {} bytes, but got {})",
27005                Self::ENCODED_LEN,
27006                __tmp.remaining(),
27007            )
27008        }
27009        __tmp.put_u16_le(self.req_message_rate);
27010        __tmp.put_u8(self.target_system);
27011        __tmp.put_u8(self.target_component);
27012        __tmp.put_u8(self.req_stream_id);
27013        __tmp.put_u8(self.start_stop);
27014        if matches!(version, MavlinkVersion::V2) {
27015            let len = __tmp.len();
27016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27017        } else {
27018            __tmp.len()
27019        }
27020    }
27021}
27022#[doc = "id: 75"]
27023#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
27024#[derive(Debug, Clone, PartialEq)]
27025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27027pub struct COMMAND_INT_DATA {
27028    #[doc = "PARAM1, see MAV_CMD enum"]
27029    pub param1: f32,
27030    #[doc = "PARAM2, see MAV_CMD enum"]
27031    pub param2: f32,
27032    #[doc = "PARAM3, see MAV_CMD enum"]
27033    pub param3: f32,
27034    #[doc = "PARAM4, see MAV_CMD enum"]
27035    pub param4: f32,
27036    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
27037    pub x: i32,
27038    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
27039    pub y: i32,
27040    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
27041    pub z: f32,
27042    #[doc = "The scheduled action for the mission item."]
27043    pub command: MavCmd,
27044    #[doc = "System ID"]
27045    pub target_system: u8,
27046    #[doc = "Component ID"]
27047    pub target_component: u8,
27048    #[doc = "The coordinate system of the COMMAND."]
27049    pub frame: MavFrame,
27050    #[doc = "Not used."]
27051    pub current: u8,
27052    #[doc = "Not used (set 0)."]
27053    pub autocontinue: u8,
27054}
27055impl COMMAND_INT_DATA {
27056    pub const ENCODED_LEN: usize = 35usize;
27057    pub const DEFAULT: Self = Self {
27058        param1: 0.0_f32,
27059        param2: 0.0_f32,
27060        param3: 0.0_f32,
27061        param4: 0.0_f32,
27062        x: 0_i32,
27063        y: 0_i32,
27064        z: 0.0_f32,
27065        command: MavCmd::DEFAULT,
27066        target_system: 0_u8,
27067        target_component: 0_u8,
27068        frame: MavFrame::DEFAULT,
27069        current: 0_u8,
27070        autocontinue: 0_u8,
27071    };
27072    #[cfg(feature = "arbitrary")]
27073    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27074        use arbitrary::{Arbitrary, Unstructured};
27075        let mut buf = [0u8; 1024];
27076        rng.fill_bytes(&mut buf);
27077        let mut unstructured = Unstructured::new(&buf);
27078        Self::arbitrary(&mut unstructured).unwrap_or_default()
27079    }
27080}
27081impl Default for COMMAND_INT_DATA {
27082    fn default() -> Self {
27083        Self::DEFAULT.clone()
27084    }
27085}
27086impl MessageData for COMMAND_INT_DATA {
27087    type Message = MavMessage;
27088    const ID: u32 = 75u32;
27089    const NAME: &'static str = "COMMAND_INT";
27090    const EXTRA_CRC: u8 = 158u8;
27091    const ENCODED_LEN: usize = 35usize;
27092    fn deser(
27093        _version: MavlinkVersion,
27094        __input: &[u8],
27095    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27096        let avail_len = __input.len();
27097        let mut payload_buf = [0; Self::ENCODED_LEN];
27098        let mut buf = if avail_len < Self::ENCODED_LEN {
27099            payload_buf[0..avail_len].copy_from_slice(__input);
27100            Bytes::new(&payload_buf)
27101        } else {
27102            Bytes::new(__input)
27103        };
27104        let mut __struct = Self::default();
27105        __struct.param1 = buf.get_f32_le();
27106        __struct.param2 = buf.get_f32_le();
27107        __struct.param3 = buf.get_f32_le();
27108        __struct.param4 = buf.get_f32_le();
27109        __struct.x = buf.get_i32_le();
27110        __struct.y = buf.get_i32_le();
27111        __struct.z = buf.get_f32_le();
27112        let tmp = buf.get_u16_le();
27113        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
27114            ::mavlink_core::error::ParserError::InvalidEnum {
27115                enum_type: "MavCmd",
27116                value: tmp as u32,
27117            },
27118        )?;
27119        __struct.target_system = buf.get_u8();
27120        __struct.target_component = buf.get_u8();
27121        let tmp = buf.get_u8();
27122        __struct.frame =
27123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27124                enum_type: "MavFrame",
27125                value: tmp as u32,
27126            })?;
27127        __struct.current = buf.get_u8();
27128        __struct.autocontinue = buf.get_u8();
27129        Ok(__struct)
27130    }
27131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27132        let mut __tmp = BytesMut::new(bytes);
27133        #[allow(clippy::absurd_extreme_comparisons)]
27134        #[allow(unused_comparisons)]
27135        if __tmp.remaining() < Self::ENCODED_LEN {
27136            panic!(
27137                "buffer is too small (need {} bytes, but got {})",
27138                Self::ENCODED_LEN,
27139                __tmp.remaining(),
27140            )
27141        }
27142        __tmp.put_f32_le(self.param1);
27143        __tmp.put_f32_le(self.param2);
27144        __tmp.put_f32_le(self.param3);
27145        __tmp.put_f32_le(self.param4);
27146        __tmp.put_i32_le(self.x);
27147        __tmp.put_i32_le(self.y);
27148        __tmp.put_f32_le(self.z);
27149        __tmp.put_u16_le(self.command as u16);
27150        __tmp.put_u8(self.target_system);
27151        __tmp.put_u8(self.target_component);
27152        __tmp.put_u8(self.frame as u8);
27153        __tmp.put_u8(self.current);
27154        __tmp.put_u8(self.autocontinue);
27155        if matches!(version, MavlinkVersion::V2) {
27156            let len = __tmp.len();
27157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27158        } else {
27159            __tmp.len()
27160        }
27161    }
27162}
27163#[doc = "id: 102"]
27164#[doc = "Local position/attitude estimate from a vision source."]
27165#[derive(Debug, Clone, PartialEq)]
27166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27168pub struct VISION_POSITION_ESTIMATE_DATA {
27169    #[doc = "Timestamp (UNIX time or time since system boot)"]
27170    pub usec: u64,
27171    #[doc = "Local X position"]
27172    pub x: f32,
27173    #[doc = "Local Y position"]
27174    pub y: f32,
27175    #[doc = "Local Z position"]
27176    pub z: f32,
27177    #[doc = "Roll angle"]
27178    pub roll: f32,
27179    #[doc = "Pitch angle"]
27180    pub pitch: f32,
27181    #[doc = "Yaw angle"]
27182    pub yaw: f32,
27183    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
27184    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27185    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27186    pub covariance: [f32; 21],
27187    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
27188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27189    pub reset_counter: u8,
27190}
27191impl VISION_POSITION_ESTIMATE_DATA {
27192    pub const ENCODED_LEN: usize = 117usize;
27193    pub const DEFAULT: Self = Self {
27194        usec: 0_u64,
27195        x: 0.0_f32,
27196        y: 0.0_f32,
27197        z: 0.0_f32,
27198        roll: 0.0_f32,
27199        pitch: 0.0_f32,
27200        yaw: 0.0_f32,
27201        covariance: [0.0_f32; 21usize],
27202        reset_counter: 0_u8,
27203    };
27204    #[cfg(feature = "arbitrary")]
27205    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27206        use arbitrary::{Arbitrary, Unstructured};
27207        let mut buf = [0u8; 1024];
27208        rng.fill_bytes(&mut buf);
27209        let mut unstructured = Unstructured::new(&buf);
27210        Self::arbitrary(&mut unstructured).unwrap_or_default()
27211    }
27212}
27213impl Default for VISION_POSITION_ESTIMATE_DATA {
27214    fn default() -> Self {
27215        Self::DEFAULT.clone()
27216    }
27217}
27218impl MessageData for VISION_POSITION_ESTIMATE_DATA {
27219    type Message = MavMessage;
27220    const ID: u32 = 102u32;
27221    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
27222    const EXTRA_CRC: u8 = 158u8;
27223    const ENCODED_LEN: usize = 117usize;
27224    fn deser(
27225        _version: MavlinkVersion,
27226        __input: &[u8],
27227    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27228        let avail_len = __input.len();
27229        let mut payload_buf = [0; Self::ENCODED_LEN];
27230        let mut buf = if avail_len < Self::ENCODED_LEN {
27231            payload_buf[0..avail_len].copy_from_slice(__input);
27232            Bytes::new(&payload_buf)
27233        } else {
27234            Bytes::new(__input)
27235        };
27236        let mut __struct = Self::default();
27237        __struct.usec = buf.get_u64_le();
27238        __struct.x = buf.get_f32_le();
27239        __struct.y = buf.get_f32_le();
27240        __struct.z = buf.get_f32_le();
27241        __struct.roll = buf.get_f32_le();
27242        __struct.pitch = buf.get_f32_le();
27243        __struct.yaw = buf.get_f32_le();
27244        for v in &mut __struct.covariance {
27245            let val = buf.get_f32_le();
27246            *v = val;
27247        }
27248        __struct.reset_counter = buf.get_u8();
27249        Ok(__struct)
27250    }
27251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27252        let mut __tmp = BytesMut::new(bytes);
27253        #[allow(clippy::absurd_extreme_comparisons)]
27254        #[allow(unused_comparisons)]
27255        if __tmp.remaining() < Self::ENCODED_LEN {
27256            panic!(
27257                "buffer is too small (need {} bytes, but got {})",
27258                Self::ENCODED_LEN,
27259                __tmp.remaining(),
27260            )
27261        }
27262        __tmp.put_u64_le(self.usec);
27263        __tmp.put_f32_le(self.x);
27264        __tmp.put_f32_le(self.y);
27265        __tmp.put_f32_le(self.z);
27266        __tmp.put_f32_le(self.roll);
27267        __tmp.put_f32_le(self.pitch);
27268        __tmp.put_f32_le(self.yaw);
27269        for val in &self.covariance {
27270            __tmp.put_f32_le(*val);
27271        }
27272        __tmp.put_u8(self.reset_counter);
27273        if matches!(version, MavlinkVersion::V2) {
27274            let len = __tmp.len();
27275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27276        } else {
27277            __tmp.len()
27278        }
27279    }
27280}
27281#[doc = "id: 29"]
27282#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27283#[derive(Debug, Clone, PartialEq)]
27284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27286pub struct SCALED_PRESSURE_DATA {
27287    #[doc = "Timestamp (time since system boot)."]
27288    pub time_boot_ms: u32,
27289    #[doc = "Absolute pressure"]
27290    pub press_abs: f32,
27291    #[doc = "Differential pressure 1"]
27292    pub press_diff: f32,
27293    #[doc = "Absolute pressure temperature"]
27294    pub temperature: i16,
27295    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27296    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27297    pub temperature_press_diff: i16,
27298}
27299impl SCALED_PRESSURE_DATA {
27300    pub const ENCODED_LEN: usize = 16usize;
27301    pub const DEFAULT: Self = Self {
27302        time_boot_ms: 0_u32,
27303        press_abs: 0.0_f32,
27304        press_diff: 0.0_f32,
27305        temperature: 0_i16,
27306        temperature_press_diff: 0_i16,
27307    };
27308    #[cfg(feature = "arbitrary")]
27309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27310        use arbitrary::{Arbitrary, Unstructured};
27311        let mut buf = [0u8; 1024];
27312        rng.fill_bytes(&mut buf);
27313        let mut unstructured = Unstructured::new(&buf);
27314        Self::arbitrary(&mut unstructured).unwrap_or_default()
27315    }
27316}
27317impl Default for SCALED_PRESSURE_DATA {
27318    fn default() -> Self {
27319        Self::DEFAULT.clone()
27320    }
27321}
27322impl MessageData for SCALED_PRESSURE_DATA {
27323    type Message = MavMessage;
27324    const ID: u32 = 29u32;
27325    const NAME: &'static str = "SCALED_PRESSURE";
27326    const EXTRA_CRC: u8 = 115u8;
27327    const ENCODED_LEN: usize = 16usize;
27328    fn deser(
27329        _version: MavlinkVersion,
27330        __input: &[u8],
27331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27332        let avail_len = __input.len();
27333        let mut payload_buf = [0; Self::ENCODED_LEN];
27334        let mut buf = if avail_len < Self::ENCODED_LEN {
27335            payload_buf[0..avail_len].copy_from_slice(__input);
27336            Bytes::new(&payload_buf)
27337        } else {
27338            Bytes::new(__input)
27339        };
27340        let mut __struct = Self::default();
27341        __struct.time_boot_ms = buf.get_u32_le();
27342        __struct.press_abs = buf.get_f32_le();
27343        __struct.press_diff = buf.get_f32_le();
27344        __struct.temperature = buf.get_i16_le();
27345        __struct.temperature_press_diff = buf.get_i16_le();
27346        Ok(__struct)
27347    }
27348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27349        let mut __tmp = BytesMut::new(bytes);
27350        #[allow(clippy::absurd_extreme_comparisons)]
27351        #[allow(unused_comparisons)]
27352        if __tmp.remaining() < Self::ENCODED_LEN {
27353            panic!(
27354                "buffer is too small (need {} bytes, but got {})",
27355                Self::ENCODED_LEN,
27356                __tmp.remaining(),
27357            )
27358        }
27359        __tmp.put_u32_le(self.time_boot_ms);
27360        __tmp.put_f32_le(self.press_abs);
27361        __tmp.put_f32_le(self.press_diff);
27362        __tmp.put_i16_le(self.temperature);
27363        __tmp.put_i16_le(self.temperature_press_diff);
27364        if matches!(version, MavlinkVersion::V2) {
27365            let len = __tmp.len();
27366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27367        } else {
27368            __tmp.len()
27369        }
27370    }
27371}
27372#[doc = "id: 388"]
27373#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
27374#[derive(Debug, Clone, PartialEq)]
27375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27377pub struct CAN_FILTER_MODIFY_DATA {
27378    #[doc = "filter IDs, length num_ids"]
27379    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27380    pub ids: [u16; 16],
27381    #[doc = "System ID."]
27382    pub target_system: u8,
27383    #[doc = "Component ID."]
27384    pub target_component: u8,
27385    #[doc = "bus number"]
27386    pub bus: u8,
27387    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
27388    pub operation: CanFilterOp,
27389    #[doc = "number of IDs in filter list"]
27390    pub num_ids: u8,
27391}
27392impl CAN_FILTER_MODIFY_DATA {
27393    pub const ENCODED_LEN: usize = 37usize;
27394    pub const DEFAULT: Self = Self {
27395        ids: [0_u16; 16usize],
27396        target_system: 0_u8,
27397        target_component: 0_u8,
27398        bus: 0_u8,
27399        operation: CanFilterOp::DEFAULT,
27400        num_ids: 0_u8,
27401    };
27402    #[cfg(feature = "arbitrary")]
27403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27404        use arbitrary::{Arbitrary, Unstructured};
27405        let mut buf = [0u8; 1024];
27406        rng.fill_bytes(&mut buf);
27407        let mut unstructured = Unstructured::new(&buf);
27408        Self::arbitrary(&mut unstructured).unwrap_or_default()
27409    }
27410}
27411impl Default for CAN_FILTER_MODIFY_DATA {
27412    fn default() -> Self {
27413        Self::DEFAULT.clone()
27414    }
27415}
27416impl MessageData for CAN_FILTER_MODIFY_DATA {
27417    type Message = MavMessage;
27418    const ID: u32 = 388u32;
27419    const NAME: &'static str = "CAN_FILTER_MODIFY";
27420    const EXTRA_CRC: u8 = 8u8;
27421    const ENCODED_LEN: usize = 37usize;
27422    fn deser(
27423        _version: MavlinkVersion,
27424        __input: &[u8],
27425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27426        let avail_len = __input.len();
27427        let mut payload_buf = [0; Self::ENCODED_LEN];
27428        let mut buf = if avail_len < Self::ENCODED_LEN {
27429            payload_buf[0..avail_len].copy_from_slice(__input);
27430            Bytes::new(&payload_buf)
27431        } else {
27432            Bytes::new(__input)
27433        };
27434        let mut __struct = Self::default();
27435        for v in &mut __struct.ids {
27436            let val = buf.get_u16_le();
27437            *v = val;
27438        }
27439        __struct.target_system = buf.get_u8();
27440        __struct.target_component = buf.get_u8();
27441        __struct.bus = buf.get_u8();
27442        let tmp = buf.get_u8();
27443        __struct.operation =
27444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27445                enum_type: "CanFilterOp",
27446                value: tmp as u32,
27447            })?;
27448        __struct.num_ids = buf.get_u8();
27449        Ok(__struct)
27450    }
27451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27452        let mut __tmp = BytesMut::new(bytes);
27453        #[allow(clippy::absurd_extreme_comparisons)]
27454        #[allow(unused_comparisons)]
27455        if __tmp.remaining() < Self::ENCODED_LEN {
27456            panic!(
27457                "buffer is too small (need {} bytes, but got {})",
27458                Self::ENCODED_LEN,
27459                __tmp.remaining(),
27460            )
27461        }
27462        for val in &self.ids {
27463            __tmp.put_u16_le(*val);
27464        }
27465        __tmp.put_u8(self.target_system);
27466        __tmp.put_u8(self.target_component);
27467        __tmp.put_u8(self.bus);
27468        __tmp.put_u8(self.operation as u8);
27469        __tmp.put_u8(self.num_ids);
27470        if matches!(version, MavlinkVersion::V2) {
27471            let len = __tmp.len();
27472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27473        } else {
27474            __tmp.len()
27475        }
27476    }
27477}
27478#[doc = "id: 107"]
27479#[doc = "The IMU readings in SI units in NED body frame."]
27480#[derive(Debug, Clone, PartialEq)]
27481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27483pub struct HIL_SENSOR_DATA {
27484    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27485    pub time_usec: u64,
27486    #[doc = "X acceleration"]
27487    pub xacc: f32,
27488    #[doc = "Y acceleration"]
27489    pub yacc: f32,
27490    #[doc = "Z acceleration"]
27491    pub zacc: f32,
27492    #[doc = "Angular speed around X axis in body frame"]
27493    pub xgyro: f32,
27494    #[doc = "Angular speed around Y axis in body frame"]
27495    pub ygyro: f32,
27496    #[doc = "Angular speed around Z axis in body frame"]
27497    pub zgyro: f32,
27498    #[doc = "X Magnetic field"]
27499    pub xmag: f32,
27500    #[doc = "Y Magnetic field"]
27501    pub ymag: f32,
27502    #[doc = "Z Magnetic field"]
27503    pub zmag: f32,
27504    #[doc = "Absolute pressure"]
27505    pub abs_pressure: f32,
27506    #[doc = "Differential pressure (airspeed)"]
27507    pub diff_pressure: f32,
27508    #[doc = "Altitude calculated from pressure"]
27509    pub pressure_alt: f32,
27510    #[doc = "Temperature"]
27511    pub temperature: f32,
27512    #[doc = "Bitmap for fields that have updated since last message"]
27513    pub fields_updated: HilSensorUpdatedFlags,
27514    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
27515    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27516    pub id: u8,
27517}
27518impl HIL_SENSOR_DATA {
27519    pub const ENCODED_LEN: usize = 65usize;
27520    pub const DEFAULT: Self = Self {
27521        time_usec: 0_u64,
27522        xacc: 0.0_f32,
27523        yacc: 0.0_f32,
27524        zacc: 0.0_f32,
27525        xgyro: 0.0_f32,
27526        ygyro: 0.0_f32,
27527        zgyro: 0.0_f32,
27528        xmag: 0.0_f32,
27529        ymag: 0.0_f32,
27530        zmag: 0.0_f32,
27531        abs_pressure: 0.0_f32,
27532        diff_pressure: 0.0_f32,
27533        pressure_alt: 0.0_f32,
27534        temperature: 0.0_f32,
27535        fields_updated: HilSensorUpdatedFlags::DEFAULT,
27536        id: 0_u8,
27537    };
27538    #[cfg(feature = "arbitrary")]
27539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27540        use arbitrary::{Arbitrary, Unstructured};
27541        let mut buf = [0u8; 1024];
27542        rng.fill_bytes(&mut buf);
27543        let mut unstructured = Unstructured::new(&buf);
27544        Self::arbitrary(&mut unstructured).unwrap_or_default()
27545    }
27546}
27547impl Default for HIL_SENSOR_DATA {
27548    fn default() -> Self {
27549        Self::DEFAULT.clone()
27550    }
27551}
27552impl MessageData for HIL_SENSOR_DATA {
27553    type Message = MavMessage;
27554    const ID: u32 = 107u32;
27555    const NAME: &'static str = "HIL_SENSOR";
27556    const EXTRA_CRC: u8 = 108u8;
27557    const ENCODED_LEN: usize = 65usize;
27558    fn deser(
27559        _version: MavlinkVersion,
27560        __input: &[u8],
27561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27562        let avail_len = __input.len();
27563        let mut payload_buf = [0; Self::ENCODED_LEN];
27564        let mut buf = if avail_len < Self::ENCODED_LEN {
27565            payload_buf[0..avail_len].copy_from_slice(__input);
27566            Bytes::new(&payload_buf)
27567        } else {
27568            Bytes::new(__input)
27569        };
27570        let mut __struct = Self::default();
27571        __struct.time_usec = buf.get_u64_le();
27572        __struct.xacc = buf.get_f32_le();
27573        __struct.yacc = buf.get_f32_le();
27574        __struct.zacc = buf.get_f32_le();
27575        __struct.xgyro = buf.get_f32_le();
27576        __struct.ygyro = buf.get_f32_le();
27577        __struct.zgyro = buf.get_f32_le();
27578        __struct.xmag = buf.get_f32_le();
27579        __struct.ymag = buf.get_f32_le();
27580        __struct.zmag = buf.get_f32_le();
27581        __struct.abs_pressure = buf.get_f32_le();
27582        __struct.diff_pressure = buf.get_f32_le();
27583        __struct.pressure_alt = buf.get_f32_le();
27584        __struct.temperature = buf.get_f32_le();
27585        let tmp = buf.get_u32_le();
27586        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
27587            tmp & HilSensorUpdatedFlags::all().bits(),
27588        )
27589        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27590            flag_type: "HilSensorUpdatedFlags",
27591            value: tmp as u32,
27592        })?;
27593        __struct.id = buf.get_u8();
27594        Ok(__struct)
27595    }
27596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27597        let mut __tmp = BytesMut::new(bytes);
27598        #[allow(clippy::absurd_extreme_comparisons)]
27599        #[allow(unused_comparisons)]
27600        if __tmp.remaining() < Self::ENCODED_LEN {
27601            panic!(
27602                "buffer is too small (need {} bytes, but got {})",
27603                Self::ENCODED_LEN,
27604                __tmp.remaining(),
27605            )
27606        }
27607        __tmp.put_u64_le(self.time_usec);
27608        __tmp.put_f32_le(self.xacc);
27609        __tmp.put_f32_le(self.yacc);
27610        __tmp.put_f32_le(self.zacc);
27611        __tmp.put_f32_le(self.xgyro);
27612        __tmp.put_f32_le(self.ygyro);
27613        __tmp.put_f32_le(self.zgyro);
27614        __tmp.put_f32_le(self.xmag);
27615        __tmp.put_f32_le(self.ymag);
27616        __tmp.put_f32_le(self.zmag);
27617        __tmp.put_f32_le(self.abs_pressure);
27618        __tmp.put_f32_le(self.diff_pressure);
27619        __tmp.put_f32_le(self.pressure_alt);
27620        __tmp.put_f32_le(self.temperature);
27621        __tmp.put_u32_le(self.fields_updated.bits());
27622        __tmp.put_u8(self.id);
27623        if matches!(version, MavlinkVersion::V2) {
27624            let len = __tmp.len();
27625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27626        } else {
27627            __tmp.len()
27628        }
27629    }
27630}
27631#[doc = "id: 268"]
27632#[doc = "An ack for a LOGGING_DATA_ACKED message."]
27633#[derive(Debug, Clone, PartialEq)]
27634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27636pub struct LOGGING_ACK_DATA {
27637    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
27638    pub sequence: u16,
27639    #[doc = "system ID of the target"]
27640    pub target_system: u8,
27641    #[doc = "component ID of the target"]
27642    pub target_component: u8,
27643}
27644impl LOGGING_ACK_DATA {
27645    pub const ENCODED_LEN: usize = 4usize;
27646    pub const DEFAULT: Self = Self {
27647        sequence: 0_u16,
27648        target_system: 0_u8,
27649        target_component: 0_u8,
27650    };
27651    #[cfg(feature = "arbitrary")]
27652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27653        use arbitrary::{Arbitrary, Unstructured};
27654        let mut buf = [0u8; 1024];
27655        rng.fill_bytes(&mut buf);
27656        let mut unstructured = Unstructured::new(&buf);
27657        Self::arbitrary(&mut unstructured).unwrap_or_default()
27658    }
27659}
27660impl Default for LOGGING_ACK_DATA {
27661    fn default() -> Self {
27662        Self::DEFAULT.clone()
27663    }
27664}
27665impl MessageData for LOGGING_ACK_DATA {
27666    type Message = MavMessage;
27667    const ID: u32 = 268u32;
27668    const NAME: &'static str = "LOGGING_ACK";
27669    const EXTRA_CRC: u8 = 14u8;
27670    const ENCODED_LEN: usize = 4usize;
27671    fn deser(
27672        _version: MavlinkVersion,
27673        __input: &[u8],
27674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27675        let avail_len = __input.len();
27676        let mut payload_buf = [0; Self::ENCODED_LEN];
27677        let mut buf = if avail_len < Self::ENCODED_LEN {
27678            payload_buf[0..avail_len].copy_from_slice(__input);
27679            Bytes::new(&payload_buf)
27680        } else {
27681            Bytes::new(__input)
27682        };
27683        let mut __struct = Self::default();
27684        __struct.sequence = buf.get_u16_le();
27685        __struct.target_system = buf.get_u8();
27686        __struct.target_component = buf.get_u8();
27687        Ok(__struct)
27688    }
27689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27690        let mut __tmp = BytesMut::new(bytes);
27691        #[allow(clippy::absurd_extreme_comparisons)]
27692        #[allow(unused_comparisons)]
27693        if __tmp.remaining() < Self::ENCODED_LEN {
27694            panic!(
27695                "buffer is too small (need {} bytes, but got {})",
27696                Self::ENCODED_LEN,
27697                __tmp.remaining(),
27698            )
27699        }
27700        __tmp.put_u16_le(self.sequence);
27701        __tmp.put_u8(self.target_system);
27702        __tmp.put_u8(self.target_component);
27703        if matches!(version, MavlinkVersion::V2) {
27704            let len = __tmp.len();
27705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27706        } else {
27707            __tmp.len()
27708        }
27709    }
27710}
27711#[doc = "id: 259"]
27712#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
27713#[derive(Debug, Clone, PartialEq)]
27714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27716pub struct CAMERA_INFORMATION_DATA {
27717    #[doc = "Timestamp (time since system boot)."]
27718    pub time_boot_ms: u32,
27719    #[doc = "0xff). Use 0 if not known."]
27720    pub firmware_version: u32,
27721    #[doc = "Focal length. Use NaN if not known."]
27722    pub focal_length: f32,
27723    #[doc = "Image sensor size horizontal. Use NaN if not known."]
27724    pub sensor_size_h: f32,
27725    #[doc = "Image sensor size vertical. Use NaN if not known."]
27726    pub sensor_size_v: f32,
27727    #[doc = "Bitmap of camera capability flags."]
27728    pub flags: CameraCapFlags,
27729    #[doc = "Horizontal image resolution. Use 0 if not known."]
27730    pub resolution_h: u16,
27731    #[doc = "Vertical image resolution. Use 0 if not known."]
27732    pub resolution_v: u16,
27733    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
27734    pub cam_definition_version: u16,
27735    #[doc = "Name of the camera vendor"]
27736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27737    pub vendor_name: [u8; 32],
27738    #[doc = "Name of the camera model"]
27739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27740    pub model_name: [u8; 32],
27741    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
27742    pub lens_id: u8,
27743    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
27744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27745    pub cam_definition_uri: [u8; 140],
27746    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
27747    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27748    pub gimbal_device_id: u8,
27749    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
27750    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27751    pub camera_device_id: u8,
27752}
27753impl CAMERA_INFORMATION_DATA {
27754    pub const ENCODED_LEN: usize = 237usize;
27755    pub const DEFAULT: Self = Self {
27756        time_boot_ms: 0_u32,
27757        firmware_version: 0_u32,
27758        focal_length: 0.0_f32,
27759        sensor_size_h: 0.0_f32,
27760        sensor_size_v: 0.0_f32,
27761        flags: CameraCapFlags::DEFAULT,
27762        resolution_h: 0_u16,
27763        resolution_v: 0_u16,
27764        cam_definition_version: 0_u16,
27765        vendor_name: [0_u8; 32usize],
27766        model_name: [0_u8; 32usize],
27767        lens_id: 0_u8,
27768        cam_definition_uri: [0_u8; 140usize],
27769        gimbal_device_id: 0_u8,
27770        camera_device_id: 0_u8,
27771    };
27772    #[cfg(feature = "arbitrary")]
27773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27774        use arbitrary::{Arbitrary, Unstructured};
27775        let mut buf = [0u8; 1024];
27776        rng.fill_bytes(&mut buf);
27777        let mut unstructured = Unstructured::new(&buf);
27778        Self::arbitrary(&mut unstructured).unwrap_or_default()
27779    }
27780}
27781impl Default for CAMERA_INFORMATION_DATA {
27782    fn default() -> Self {
27783        Self::DEFAULT.clone()
27784    }
27785}
27786impl MessageData for CAMERA_INFORMATION_DATA {
27787    type Message = MavMessage;
27788    const ID: u32 = 259u32;
27789    const NAME: &'static str = "CAMERA_INFORMATION";
27790    const EXTRA_CRC: u8 = 92u8;
27791    const ENCODED_LEN: usize = 237usize;
27792    fn deser(
27793        _version: MavlinkVersion,
27794        __input: &[u8],
27795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27796        let avail_len = __input.len();
27797        let mut payload_buf = [0; Self::ENCODED_LEN];
27798        let mut buf = if avail_len < Self::ENCODED_LEN {
27799            payload_buf[0..avail_len].copy_from_slice(__input);
27800            Bytes::new(&payload_buf)
27801        } else {
27802            Bytes::new(__input)
27803        };
27804        let mut __struct = Self::default();
27805        __struct.time_boot_ms = buf.get_u32_le();
27806        __struct.firmware_version = buf.get_u32_le();
27807        __struct.focal_length = buf.get_f32_le();
27808        __struct.sensor_size_h = buf.get_f32_le();
27809        __struct.sensor_size_v = buf.get_f32_le();
27810        let tmp = buf.get_u32_le();
27811        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
27812            ::mavlink_core::error::ParserError::InvalidFlag {
27813                flag_type: "CameraCapFlags",
27814                value: tmp as u32,
27815            },
27816        )?;
27817        __struct.resolution_h = buf.get_u16_le();
27818        __struct.resolution_v = buf.get_u16_le();
27819        __struct.cam_definition_version = buf.get_u16_le();
27820        for v in &mut __struct.vendor_name {
27821            let val = buf.get_u8();
27822            *v = val;
27823        }
27824        for v in &mut __struct.model_name {
27825            let val = buf.get_u8();
27826            *v = val;
27827        }
27828        __struct.lens_id = buf.get_u8();
27829        for v in &mut __struct.cam_definition_uri {
27830            let val = buf.get_u8();
27831            *v = val;
27832        }
27833        __struct.gimbal_device_id = buf.get_u8();
27834        __struct.camera_device_id = buf.get_u8();
27835        Ok(__struct)
27836    }
27837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27838        let mut __tmp = BytesMut::new(bytes);
27839        #[allow(clippy::absurd_extreme_comparisons)]
27840        #[allow(unused_comparisons)]
27841        if __tmp.remaining() < Self::ENCODED_LEN {
27842            panic!(
27843                "buffer is too small (need {} bytes, but got {})",
27844                Self::ENCODED_LEN,
27845                __tmp.remaining(),
27846            )
27847        }
27848        __tmp.put_u32_le(self.time_boot_ms);
27849        __tmp.put_u32_le(self.firmware_version);
27850        __tmp.put_f32_le(self.focal_length);
27851        __tmp.put_f32_le(self.sensor_size_h);
27852        __tmp.put_f32_le(self.sensor_size_v);
27853        __tmp.put_u32_le(self.flags.bits());
27854        __tmp.put_u16_le(self.resolution_h);
27855        __tmp.put_u16_le(self.resolution_v);
27856        __tmp.put_u16_le(self.cam_definition_version);
27857        for val in &self.vendor_name {
27858            __tmp.put_u8(*val);
27859        }
27860        for val in &self.model_name {
27861            __tmp.put_u8(*val);
27862        }
27863        __tmp.put_u8(self.lens_id);
27864        for val in &self.cam_definition_uri {
27865            __tmp.put_u8(*val);
27866        }
27867        __tmp.put_u8(self.gimbal_device_id);
27868        __tmp.put_u8(self.camera_device_id);
27869        if matches!(version, MavlinkVersion::V2) {
27870            let len = __tmp.len();
27871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27872        } else {
27873            __tmp.len()
27874        }
27875    }
27876}
27877#[doc = "id: 372"]
27878#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
27879#[derive(Debug, Clone, PartialEq)]
27880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27882pub struct BATTERY_INFO_DATA {
27883    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
27884    pub discharge_minimum_voltage: f32,
27885    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
27886    pub charging_minimum_voltage: f32,
27887    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
27888    pub resting_minimum_voltage: f32,
27889    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
27890    pub charging_maximum_voltage: f32,
27891    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
27892    pub charging_maximum_current: f32,
27893    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
27894    pub nominal_voltage: f32,
27895    #[doc = "Maximum pack discharge current. 0: field not provided."]
27896    pub discharge_maximum_current: f32,
27897    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
27898    pub discharge_maximum_burst_current: f32,
27899    #[doc = "Fully charged design capacity. 0: field not provided."]
27900    pub design_capacity: f32,
27901    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
27902    pub full_charge_capacity: f32,
27903    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
27904    pub cycle_count: u16,
27905    #[doc = "Battery weight. 0: field not provided."]
27906    pub weight: u16,
27907    #[doc = "Battery ID"]
27908    pub id: u8,
27909    #[doc = "Function of the battery."]
27910    pub battery_function: MavBatteryFunction,
27911    #[doc = "Type (chemistry) of the battery."]
27912    pub mavtype: MavBatteryType,
27913    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
27914    pub state_of_health: u8,
27915    #[doc = "Number of battery cells in series. 0: field not provided."]
27916    pub cells_in_series: u8,
27917    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
27918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27919    pub manufacture_date: [u8; 9],
27920    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
27921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27922    pub serial_number: [u8; 32],
27923    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
27924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27925    pub name: [u8; 50],
27926}
27927impl BATTERY_INFO_DATA {
27928    pub const ENCODED_LEN: usize = 140usize;
27929    pub const DEFAULT: Self = Self {
27930        discharge_minimum_voltage: 0.0_f32,
27931        charging_minimum_voltage: 0.0_f32,
27932        resting_minimum_voltage: 0.0_f32,
27933        charging_maximum_voltage: 0.0_f32,
27934        charging_maximum_current: 0.0_f32,
27935        nominal_voltage: 0.0_f32,
27936        discharge_maximum_current: 0.0_f32,
27937        discharge_maximum_burst_current: 0.0_f32,
27938        design_capacity: 0.0_f32,
27939        full_charge_capacity: 0.0_f32,
27940        cycle_count: 0_u16,
27941        weight: 0_u16,
27942        id: 0_u8,
27943        battery_function: MavBatteryFunction::DEFAULT,
27944        mavtype: MavBatteryType::DEFAULT,
27945        state_of_health: 0_u8,
27946        cells_in_series: 0_u8,
27947        manufacture_date: [0_u8; 9usize],
27948        serial_number: [0_u8; 32usize],
27949        name: [0_u8; 50usize],
27950    };
27951    #[cfg(feature = "arbitrary")]
27952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27953        use arbitrary::{Arbitrary, Unstructured};
27954        let mut buf = [0u8; 1024];
27955        rng.fill_bytes(&mut buf);
27956        let mut unstructured = Unstructured::new(&buf);
27957        Self::arbitrary(&mut unstructured).unwrap_or_default()
27958    }
27959}
27960impl Default for BATTERY_INFO_DATA {
27961    fn default() -> Self {
27962        Self::DEFAULT.clone()
27963    }
27964}
27965impl MessageData for BATTERY_INFO_DATA {
27966    type Message = MavMessage;
27967    const ID: u32 = 372u32;
27968    const NAME: &'static str = "BATTERY_INFO";
27969    const EXTRA_CRC: u8 = 26u8;
27970    const ENCODED_LEN: usize = 140usize;
27971    fn deser(
27972        _version: MavlinkVersion,
27973        __input: &[u8],
27974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27975        let avail_len = __input.len();
27976        let mut payload_buf = [0; Self::ENCODED_LEN];
27977        let mut buf = if avail_len < Self::ENCODED_LEN {
27978            payload_buf[0..avail_len].copy_from_slice(__input);
27979            Bytes::new(&payload_buf)
27980        } else {
27981            Bytes::new(__input)
27982        };
27983        let mut __struct = Self::default();
27984        __struct.discharge_minimum_voltage = buf.get_f32_le();
27985        __struct.charging_minimum_voltage = buf.get_f32_le();
27986        __struct.resting_minimum_voltage = buf.get_f32_le();
27987        __struct.charging_maximum_voltage = buf.get_f32_le();
27988        __struct.charging_maximum_current = buf.get_f32_le();
27989        __struct.nominal_voltage = buf.get_f32_le();
27990        __struct.discharge_maximum_current = buf.get_f32_le();
27991        __struct.discharge_maximum_burst_current = buf.get_f32_le();
27992        __struct.design_capacity = buf.get_f32_le();
27993        __struct.full_charge_capacity = buf.get_f32_le();
27994        __struct.cycle_count = buf.get_u16_le();
27995        __struct.weight = buf.get_u16_le();
27996        __struct.id = buf.get_u8();
27997        let tmp = buf.get_u8();
27998        __struct.battery_function =
27999            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28000                enum_type: "MavBatteryFunction",
28001                value: tmp as u32,
28002            })?;
28003        let tmp = buf.get_u8();
28004        __struct.mavtype =
28005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28006                enum_type: "MavBatteryType",
28007                value: tmp as u32,
28008            })?;
28009        __struct.state_of_health = buf.get_u8();
28010        __struct.cells_in_series = buf.get_u8();
28011        for v in &mut __struct.manufacture_date {
28012            let val = buf.get_u8();
28013            *v = val;
28014        }
28015        for v in &mut __struct.serial_number {
28016            let val = buf.get_u8();
28017            *v = val;
28018        }
28019        for v in &mut __struct.name {
28020            let val = buf.get_u8();
28021            *v = val;
28022        }
28023        Ok(__struct)
28024    }
28025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28026        let mut __tmp = BytesMut::new(bytes);
28027        #[allow(clippy::absurd_extreme_comparisons)]
28028        #[allow(unused_comparisons)]
28029        if __tmp.remaining() < Self::ENCODED_LEN {
28030            panic!(
28031                "buffer is too small (need {} bytes, but got {})",
28032                Self::ENCODED_LEN,
28033                __tmp.remaining(),
28034            )
28035        }
28036        __tmp.put_f32_le(self.discharge_minimum_voltage);
28037        __tmp.put_f32_le(self.charging_minimum_voltage);
28038        __tmp.put_f32_le(self.resting_minimum_voltage);
28039        __tmp.put_f32_le(self.charging_maximum_voltage);
28040        __tmp.put_f32_le(self.charging_maximum_current);
28041        __tmp.put_f32_le(self.nominal_voltage);
28042        __tmp.put_f32_le(self.discharge_maximum_current);
28043        __tmp.put_f32_le(self.discharge_maximum_burst_current);
28044        __tmp.put_f32_le(self.design_capacity);
28045        __tmp.put_f32_le(self.full_charge_capacity);
28046        __tmp.put_u16_le(self.cycle_count);
28047        __tmp.put_u16_le(self.weight);
28048        __tmp.put_u8(self.id);
28049        __tmp.put_u8(self.battery_function as u8);
28050        __tmp.put_u8(self.mavtype as u8);
28051        __tmp.put_u8(self.state_of_health);
28052        __tmp.put_u8(self.cells_in_series);
28053        for val in &self.manufacture_date {
28054            __tmp.put_u8(*val);
28055        }
28056        for val in &self.serial_number {
28057            __tmp.put_u8(*val);
28058        }
28059        for val in &self.name {
28060            __tmp.put_u8(*val);
28061        }
28062        if matches!(version, MavlinkVersion::V2) {
28063            let len = __tmp.len();
28064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28065        } else {
28066            __tmp.len()
28067        }
28068    }
28069}
28070#[doc = "id: 220"]
28071#[doc = "Accelerometer and Gyro biases from the navigation filter."]
28072#[derive(Debug, Clone, PartialEq)]
28073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28075pub struct NAV_FILTER_BIAS_DATA {
28076    #[doc = "Timestamp (microseconds)"]
28077    pub usec: u64,
28078    #[doc = "b_f[0]"]
28079    pub accel_0: f32,
28080    #[doc = "b_f[1]"]
28081    pub accel_1: f32,
28082    #[doc = "b_f[2]"]
28083    pub accel_2: f32,
28084    #[doc = "b_f[0]"]
28085    pub gyro_0: f32,
28086    #[doc = "b_f[1]"]
28087    pub gyro_1: f32,
28088    #[doc = "b_f[2]"]
28089    pub gyro_2: f32,
28090}
28091impl NAV_FILTER_BIAS_DATA {
28092    pub const ENCODED_LEN: usize = 32usize;
28093    pub const DEFAULT: Self = Self {
28094        usec: 0_u64,
28095        accel_0: 0.0_f32,
28096        accel_1: 0.0_f32,
28097        accel_2: 0.0_f32,
28098        gyro_0: 0.0_f32,
28099        gyro_1: 0.0_f32,
28100        gyro_2: 0.0_f32,
28101    };
28102    #[cfg(feature = "arbitrary")]
28103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28104        use arbitrary::{Arbitrary, Unstructured};
28105        let mut buf = [0u8; 1024];
28106        rng.fill_bytes(&mut buf);
28107        let mut unstructured = Unstructured::new(&buf);
28108        Self::arbitrary(&mut unstructured).unwrap_or_default()
28109    }
28110}
28111impl Default for NAV_FILTER_BIAS_DATA {
28112    fn default() -> Self {
28113        Self::DEFAULT.clone()
28114    }
28115}
28116impl MessageData for NAV_FILTER_BIAS_DATA {
28117    type Message = MavMessage;
28118    const ID: u32 = 220u32;
28119    const NAME: &'static str = "NAV_FILTER_BIAS";
28120    const EXTRA_CRC: u8 = 34u8;
28121    const ENCODED_LEN: usize = 32usize;
28122    fn deser(
28123        _version: MavlinkVersion,
28124        __input: &[u8],
28125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28126        let avail_len = __input.len();
28127        let mut payload_buf = [0; Self::ENCODED_LEN];
28128        let mut buf = if avail_len < Self::ENCODED_LEN {
28129            payload_buf[0..avail_len].copy_from_slice(__input);
28130            Bytes::new(&payload_buf)
28131        } else {
28132            Bytes::new(__input)
28133        };
28134        let mut __struct = Self::default();
28135        __struct.usec = buf.get_u64_le();
28136        __struct.accel_0 = buf.get_f32_le();
28137        __struct.accel_1 = buf.get_f32_le();
28138        __struct.accel_2 = buf.get_f32_le();
28139        __struct.gyro_0 = buf.get_f32_le();
28140        __struct.gyro_1 = buf.get_f32_le();
28141        __struct.gyro_2 = buf.get_f32_le();
28142        Ok(__struct)
28143    }
28144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28145        let mut __tmp = BytesMut::new(bytes);
28146        #[allow(clippy::absurd_extreme_comparisons)]
28147        #[allow(unused_comparisons)]
28148        if __tmp.remaining() < Self::ENCODED_LEN {
28149            panic!(
28150                "buffer is too small (need {} bytes, but got {})",
28151                Self::ENCODED_LEN,
28152                __tmp.remaining(),
28153            )
28154        }
28155        __tmp.put_u64_le(self.usec);
28156        __tmp.put_f32_le(self.accel_0);
28157        __tmp.put_f32_le(self.accel_1);
28158        __tmp.put_f32_le(self.accel_2);
28159        __tmp.put_f32_le(self.gyro_0);
28160        __tmp.put_f32_le(self.gyro_1);
28161        __tmp.put_f32_le(self.gyro_2);
28162        if matches!(version, MavlinkVersion::V2) {
28163            let len = __tmp.len();
28164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28165        } else {
28166            __tmp.len()
28167        }
28168    }
28169}
28170#[doc = "id: 271"]
28171#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
28172#[derive(Debug, Clone, PartialEq)]
28173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28175pub struct CAMERA_FOV_STATUS_DATA {
28176    #[doc = "Timestamp (time since system boot)."]
28177    pub time_boot_ms: u32,
28178    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
28179    pub lat_camera: i32,
28180    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
28181    pub lon_camera: i32,
28182    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
28183    pub alt_camera: i32,
28184    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
28185    pub lat_image: i32,
28186    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
28187    pub lon_image: i32,
28188    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
28189    pub alt_image: i32,
28190    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
28191    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28192    pub q: [f32; 4],
28193    #[doc = "Horizontal field of view (NaN if unknown)."]
28194    pub hfov: f32,
28195    #[doc = "Vertical field of view (NaN if unknown)."]
28196    pub vfov: f32,
28197    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
28198    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28199    pub camera_device_id: u8,
28200}
28201impl CAMERA_FOV_STATUS_DATA {
28202    pub const ENCODED_LEN: usize = 53usize;
28203    pub const DEFAULT: Self = Self {
28204        time_boot_ms: 0_u32,
28205        lat_camera: 0_i32,
28206        lon_camera: 0_i32,
28207        alt_camera: 0_i32,
28208        lat_image: 0_i32,
28209        lon_image: 0_i32,
28210        alt_image: 0_i32,
28211        q: [0.0_f32; 4usize],
28212        hfov: 0.0_f32,
28213        vfov: 0.0_f32,
28214        camera_device_id: 0_u8,
28215    };
28216    #[cfg(feature = "arbitrary")]
28217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28218        use arbitrary::{Arbitrary, Unstructured};
28219        let mut buf = [0u8; 1024];
28220        rng.fill_bytes(&mut buf);
28221        let mut unstructured = Unstructured::new(&buf);
28222        Self::arbitrary(&mut unstructured).unwrap_or_default()
28223    }
28224}
28225impl Default for CAMERA_FOV_STATUS_DATA {
28226    fn default() -> Self {
28227        Self::DEFAULT.clone()
28228    }
28229}
28230impl MessageData for CAMERA_FOV_STATUS_DATA {
28231    type Message = MavMessage;
28232    const ID: u32 = 271u32;
28233    const NAME: &'static str = "CAMERA_FOV_STATUS";
28234    const EXTRA_CRC: u8 = 22u8;
28235    const ENCODED_LEN: usize = 53usize;
28236    fn deser(
28237        _version: MavlinkVersion,
28238        __input: &[u8],
28239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28240        let avail_len = __input.len();
28241        let mut payload_buf = [0; Self::ENCODED_LEN];
28242        let mut buf = if avail_len < Self::ENCODED_LEN {
28243            payload_buf[0..avail_len].copy_from_slice(__input);
28244            Bytes::new(&payload_buf)
28245        } else {
28246            Bytes::new(__input)
28247        };
28248        let mut __struct = Self::default();
28249        __struct.time_boot_ms = buf.get_u32_le();
28250        __struct.lat_camera = buf.get_i32_le();
28251        __struct.lon_camera = buf.get_i32_le();
28252        __struct.alt_camera = buf.get_i32_le();
28253        __struct.lat_image = buf.get_i32_le();
28254        __struct.lon_image = buf.get_i32_le();
28255        __struct.alt_image = buf.get_i32_le();
28256        for v in &mut __struct.q {
28257            let val = buf.get_f32_le();
28258            *v = val;
28259        }
28260        __struct.hfov = buf.get_f32_le();
28261        __struct.vfov = buf.get_f32_le();
28262        __struct.camera_device_id = buf.get_u8();
28263        Ok(__struct)
28264    }
28265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28266        let mut __tmp = BytesMut::new(bytes);
28267        #[allow(clippy::absurd_extreme_comparisons)]
28268        #[allow(unused_comparisons)]
28269        if __tmp.remaining() < Self::ENCODED_LEN {
28270            panic!(
28271                "buffer is too small (need {} bytes, but got {})",
28272                Self::ENCODED_LEN,
28273                __tmp.remaining(),
28274            )
28275        }
28276        __tmp.put_u32_le(self.time_boot_ms);
28277        __tmp.put_i32_le(self.lat_camera);
28278        __tmp.put_i32_le(self.lon_camera);
28279        __tmp.put_i32_le(self.alt_camera);
28280        __tmp.put_i32_le(self.lat_image);
28281        __tmp.put_i32_le(self.lon_image);
28282        __tmp.put_i32_le(self.alt_image);
28283        for val in &self.q {
28284            __tmp.put_f32_le(*val);
28285        }
28286        __tmp.put_f32_le(self.hfov);
28287        __tmp.put_f32_le(self.vfov);
28288        __tmp.put_u8(self.camera_device_id);
28289        if matches!(version, MavlinkVersion::V2) {
28290            let len = __tmp.len();
28291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28292        } else {
28293            __tmp.len()
28294        }
28295    }
28296}
28297#[doc = "id: 33"]
28298#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
28299#[derive(Debug, Clone, PartialEq)]
28300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28302pub struct GLOBAL_POSITION_INT_DATA {
28303    #[doc = "Timestamp (time since system boot)."]
28304    pub time_boot_ms: u32,
28305    #[doc = "Latitude, expressed"]
28306    pub lat: i32,
28307    #[doc = "Longitude, expressed"]
28308    pub lon: i32,
28309    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
28310    pub alt: i32,
28311    #[doc = "Altitude above home"]
28312    pub relative_alt: i32,
28313    #[doc = "Ground X Speed (Latitude, positive north)"]
28314    pub vx: i16,
28315    #[doc = "Ground Y Speed (Longitude, positive east)"]
28316    pub vy: i16,
28317    #[doc = "Ground Z Speed (Altitude, positive down)"]
28318    pub vz: i16,
28319    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
28320    pub hdg: u16,
28321}
28322impl GLOBAL_POSITION_INT_DATA {
28323    pub const ENCODED_LEN: usize = 28usize;
28324    pub const DEFAULT: Self = Self {
28325        time_boot_ms: 0_u32,
28326        lat: 0_i32,
28327        lon: 0_i32,
28328        alt: 0_i32,
28329        relative_alt: 0_i32,
28330        vx: 0_i16,
28331        vy: 0_i16,
28332        vz: 0_i16,
28333        hdg: 0_u16,
28334    };
28335    #[cfg(feature = "arbitrary")]
28336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28337        use arbitrary::{Arbitrary, Unstructured};
28338        let mut buf = [0u8; 1024];
28339        rng.fill_bytes(&mut buf);
28340        let mut unstructured = Unstructured::new(&buf);
28341        Self::arbitrary(&mut unstructured).unwrap_or_default()
28342    }
28343}
28344impl Default for GLOBAL_POSITION_INT_DATA {
28345    fn default() -> Self {
28346        Self::DEFAULT.clone()
28347    }
28348}
28349impl MessageData for GLOBAL_POSITION_INT_DATA {
28350    type Message = MavMessage;
28351    const ID: u32 = 33u32;
28352    const NAME: &'static str = "GLOBAL_POSITION_INT";
28353    const EXTRA_CRC: u8 = 104u8;
28354    const ENCODED_LEN: usize = 28usize;
28355    fn deser(
28356        _version: MavlinkVersion,
28357        __input: &[u8],
28358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28359        let avail_len = __input.len();
28360        let mut payload_buf = [0; Self::ENCODED_LEN];
28361        let mut buf = if avail_len < Self::ENCODED_LEN {
28362            payload_buf[0..avail_len].copy_from_slice(__input);
28363            Bytes::new(&payload_buf)
28364        } else {
28365            Bytes::new(__input)
28366        };
28367        let mut __struct = Self::default();
28368        __struct.time_boot_ms = buf.get_u32_le();
28369        __struct.lat = buf.get_i32_le();
28370        __struct.lon = buf.get_i32_le();
28371        __struct.alt = buf.get_i32_le();
28372        __struct.relative_alt = buf.get_i32_le();
28373        __struct.vx = buf.get_i16_le();
28374        __struct.vy = buf.get_i16_le();
28375        __struct.vz = buf.get_i16_le();
28376        __struct.hdg = buf.get_u16_le();
28377        Ok(__struct)
28378    }
28379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28380        let mut __tmp = BytesMut::new(bytes);
28381        #[allow(clippy::absurd_extreme_comparisons)]
28382        #[allow(unused_comparisons)]
28383        if __tmp.remaining() < Self::ENCODED_LEN {
28384            panic!(
28385                "buffer is too small (need {} bytes, but got {})",
28386                Self::ENCODED_LEN,
28387                __tmp.remaining(),
28388            )
28389        }
28390        __tmp.put_u32_le(self.time_boot_ms);
28391        __tmp.put_i32_le(self.lat);
28392        __tmp.put_i32_le(self.lon);
28393        __tmp.put_i32_le(self.alt);
28394        __tmp.put_i32_le(self.relative_alt);
28395        __tmp.put_i16_le(self.vx);
28396        __tmp.put_i16_le(self.vy);
28397        __tmp.put_i16_le(self.vz);
28398        __tmp.put_u16_le(self.hdg);
28399        if matches!(version, MavlinkVersion::V2) {
28400            let len = __tmp.len();
28401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28402        } else {
28403            __tmp.len()
28404        }
28405    }
28406}
28407#[doc = "id: 12918"]
28408#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
28409#[derive(Debug, Clone, PartialEq)]
28410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28412pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
28413    #[doc = "Status level indicating if arming is allowed."]
28414    pub status: MavOdidArmStatus,
28415    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
28416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28417    pub error: [u8; 50],
28418}
28419impl OPEN_DRONE_ID_ARM_STATUS_DATA {
28420    pub const ENCODED_LEN: usize = 51usize;
28421    pub const DEFAULT: Self = Self {
28422        status: MavOdidArmStatus::DEFAULT,
28423        error: [0_u8; 50usize],
28424    };
28425    #[cfg(feature = "arbitrary")]
28426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28427        use arbitrary::{Arbitrary, Unstructured};
28428        let mut buf = [0u8; 1024];
28429        rng.fill_bytes(&mut buf);
28430        let mut unstructured = Unstructured::new(&buf);
28431        Self::arbitrary(&mut unstructured).unwrap_or_default()
28432    }
28433}
28434impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
28435    fn default() -> Self {
28436        Self::DEFAULT.clone()
28437    }
28438}
28439impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
28440    type Message = MavMessage;
28441    const ID: u32 = 12918u32;
28442    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
28443    const EXTRA_CRC: u8 = 139u8;
28444    const ENCODED_LEN: usize = 51usize;
28445    fn deser(
28446        _version: MavlinkVersion,
28447        __input: &[u8],
28448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28449        let avail_len = __input.len();
28450        let mut payload_buf = [0; Self::ENCODED_LEN];
28451        let mut buf = if avail_len < Self::ENCODED_LEN {
28452            payload_buf[0..avail_len].copy_from_slice(__input);
28453            Bytes::new(&payload_buf)
28454        } else {
28455            Bytes::new(__input)
28456        };
28457        let mut __struct = Self::default();
28458        let tmp = buf.get_u8();
28459        __struct.status =
28460            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28461                enum_type: "MavOdidArmStatus",
28462                value: tmp as u32,
28463            })?;
28464        for v in &mut __struct.error {
28465            let val = buf.get_u8();
28466            *v = val;
28467        }
28468        Ok(__struct)
28469    }
28470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28471        let mut __tmp = BytesMut::new(bytes);
28472        #[allow(clippy::absurd_extreme_comparisons)]
28473        #[allow(unused_comparisons)]
28474        if __tmp.remaining() < Self::ENCODED_LEN {
28475            panic!(
28476                "buffer is too small (need {} bytes, but got {})",
28477                Self::ENCODED_LEN,
28478                __tmp.remaining(),
28479            )
28480        }
28481        __tmp.put_u8(self.status as u8);
28482        for val in &self.error {
28483            __tmp.put_u8(*val);
28484        }
28485        if matches!(version, MavlinkVersion::V2) {
28486            let len = __tmp.len();
28487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28488        } else {
28489            __tmp.len()
28490        }
28491    }
28492}
28493#[doc = "id: 27"]
28494#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
28495#[derive(Debug, Clone, PartialEq)]
28496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28498pub struct RAW_IMU_DATA {
28499    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28500    pub time_usec: u64,
28501    #[doc = "X acceleration (raw)"]
28502    pub xacc: i16,
28503    #[doc = "Y acceleration (raw)"]
28504    pub yacc: i16,
28505    #[doc = "Z acceleration (raw)"]
28506    pub zacc: i16,
28507    #[doc = "Angular speed around X axis (raw)"]
28508    pub xgyro: i16,
28509    #[doc = "Angular speed around Y axis (raw)"]
28510    pub ygyro: i16,
28511    #[doc = "Angular speed around Z axis (raw)"]
28512    pub zgyro: i16,
28513    #[doc = "X Magnetic field (raw)"]
28514    pub xmag: i16,
28515    #[doc = "Y Magnetic field (raw)"]
28516    pub ymag: i16,
28517    #[doc = "Z Magnetic field (raw)"]
28518    pub zmag: i16,
28519    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
28520    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28521    pub id: u8,
28522    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28523    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28524    pub temperature: i16,
28525}
28526impl RAW_IMU_DATA {
28527    pub const ENCODED_LEN: usize = 29usize;
28528    pub const DEFAULT: Self = Self {
28529        time_usec: 0_u64,
28530        xacc: 0_i16,
28531        yacc: 0_i16,
28532        zacc: 0_i16,
28533        xgyro: 0_i16,
28534        ygyro: 0_i16,
28535        zgyro: 0_i16,
28536        xmag: 0_i16,
28537        ymag: 0_i16,
28538        zmag: 0_i16,
28539        id: 0_u8,
28540        temperature: 0_i16,
28541    };
28542    #[cfg(feature = "arbitrary")]
28543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28544        use arbitrary::{Arbitrary, Unstructured};
28545        let mut buf = [0u8; 1024];
28546        rng.fill_bytes(&mut buf);
28547        let mut unstructured = Unstructured::new(&buf);
28548        Self::arbitrary(&mut unstructured).unwrap_or_default()
28549    }
28550}
28551impl Default for RAW_IMU_DATA {
28552    fn default() -> Self {
28553        Self::DEFAULT.clone()
28554    }
28555}
28556impl MessageData for RAW_IMU_DATA {
28557    type Message = MavMessage;
28558    const ID: u32 = 27u32;
28559    const NAME: &'static str = "RAW_IMU";
28560    const EXTRA_CRC: u8 = 144u8;
28561    const ENCODED_LEN: usize = 29usize;
28562    fn deser(
28563        _version: MavlinkVersion,
28564        __input: &[u8],
28565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28566        let avail_len = __input.len();
28567        let mut payload_buf = [0; Self::ENCODED_LEN];
28568        let mut buf = if avail_len < Self::ENCODED_LEN {
28569            payload_buf[0..avail_len].copy_from_slice(__input);
28570            Bytes::new(&payload_buf)
28571        } else {
28572            Bytes::new(__input)
28573        };
28574        let mut __struct = Self::default();
28575        __struct.time_usec = buf.get_u64_le();
28576        __struct.xacc = buf.get_i16_le();
28577        __struct.yacc = buf.get_i16_le();
28578        __struct.zacc = buf.get_i16_le();
28579        __struct.xgyro = buf.get_i16_le();
28580        __struct.ygyro = buf.get_i16_le();
28581        __struct.zgyro = buf.get_i16_le();
28582        __struct.xmag = buf.get_i16_le();
28583        __struct.ymag = buf.get_i16_le();
28584        __struct.zmag = buf.get_i16_le();
28585        __struct.id = buf.get_u8();
28586        __struct.temperature = buf.get_i16_le();
28587        Ok(__struct)
28588    }
28589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28590        let mut __tmp = BytesMut::new(bytes);
28591        #[allow(clippy::absurd_extreme_comparisons)]
28592        #[allow(unused_comparisons)]
28593        if __tmp.remaining() < Self::ENCODED_LEN {
28594            panic!(
28595                "buffer is too small (need {} bytes, but got {})",
28596                Self::ENCODED_LEN,
28597                __tmp.remaining(),
28598            )
28599        }
28600        __tmp.put_u64_le(self.time_usec);
28601        __tmp.put_i16_le(self.xacc);
28602        __tmp.put_i16_le(self.yacc);
28603        __tmp.put_i16_le(self.zacc);
28604        __tmp.put_i16_le(self.xgyro);
28605        __tmp.put_i16_le(self.ygyro);
28606        __tmp.put_i16_le(self.zgyro);
28607        __tmp.put_i16_le(self.xmag);
28608        __tmp.put_i16_le(self.ymag);
28609        __tmp.put_i16_le(self.zmag);
28610        __tmp.put_u8(self.id);
28611        __tmp.put_i16_le(self.temperature);
28612        if matches!(version, MavlinkVersion::V2) {
28613            let len = __tmp.len();
28614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28615        } else {
28616            __tmp.len()
28617        }
28618    }
28619}
28620#[doc = "id: 87"]
28621#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
28622#[derive(Debug, Clone, PartialEq)]
28623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28625pub struct POSITION_TARGET_GLOBAL_INT_DATA {
28626    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28627    pub time_boot_ms: u32,
28628    #[doc = "Latitude in WGS84 frame"]
28629    pub lat_int: i32,
28630    #[doc = "Longitude in WGS84 frame"]
28631    pub lon_int: i32,
28632    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
28633    pub alt: f32,
28634    #[doc = "X velocity in NED frame"]
28635    pub vx: f32,
28636    #[doc = "Y velocity in NED frame"]
28637    pub vy: f32,
28638    #[doc = "Z velocity in NED frame"]
28639    pub vz: f32,
28640    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28641    pub afx: f32,
28642    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28643    pub afy: f32,
28644    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28645    pub afz: f32,
28646    #[doc = "yaw setpoint"]
28647    pub yaw: f32,
28648    #[doc = "yaw rate setpoint"]
28649    pub yaw_rate: f32,
28650    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28651    pub type_mask: PositionTargetTypemask,
28652    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28653    pub coordinate_frame: MavFrame,
28654}
28655impl POSITION_TARGET_GLOBAL_INT_DATA {
28656    pub const ENCODED_LEN: usize = 51usize;
28657    pub const DEFAULT: Self = Self {
28658        time_boot_ms: 0_u32,
28659        lat_int: 0_i32,
28660        lon_int: 0_i32,
28661        alt: 0.0_f32,
28662        vx: 0.0_f32,
28663        vy: 0.0_f32,
28664        vz: 0.0_f32,
28665        afx: 0.0_f32,
28666        afy: 0.0_f32,
28667        afz: 0.0_f32,
28668        yaw: 0.0_f32,
28669        yaw_rate: 0.0_f32,
28670        type_mask: PositionTargetTypemask::DEFAULT,
28671        coordinate_frame: MavFrame::DEFAULT,
28672    };
28673    #[cfg(feature = "arbitrary")]
28674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28675        use arbitrary::{Arbitrary, Unstructured};
28676        let mut buf = [0u8; 1024];
28677        rng.fill_bytes(&mut buf);
28678        let mut unstructured = Unstructured::new(&buf);
28679        Self::arbitrary(&mut unstructured).unwrap_or_default()
28680    }
28681}
28682impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
28683    fn default() -> Self {
28684        Self::DEFAULT.clone()
28685    }
28686}
28687impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
28688    type Message = MavMessage;
28689    const ID: u32 = 87u32;
28690    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
28691    const EXTRA_CRC: u8 = 150u8;
28692    const ENCODED_LEN: usize = 51usize;
28693    fn deser(
28694        _version: MavlinkVersion,
28695        __input: &[u8],
28696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28697        let avail_len = __input.len();
28698        let mut payload_buf = [0; Self::ENCODED_LEN];
28699        let mut buf = if avail_len < Self::ENCODED_LEN {
28700            payload_buf[0..avail_len].copy_from_slice(__input);
28701            Bytes::new(&payload_buf)
28702        } else {
28703            Bytes::new(__input)
28704        };
28705        let mut __struct = Self::default();
28706        __struct.time_boot_ms = buf.get_u32_le();
28707        __struct.lat_int = buf.get_i32_le();
28708        __struct.lon_int = buf.get_i32_le();
28709        __struct.alt = buf.get_f32_le();
28710        __struct.vx = buf.get_f32_le();
28711        __struct.vy = buf.get_f32_le();
28712        __struct.vz = buf.get_f32_le();
28713        __struct.afx = buf.get_f32_le();
28714        __struct.afy = buf.get_f32_le();
28715        __struct.afz = buf.get_f32_le();
28716        __struct.yaw = buf.get_f32_le();
28717        __struct.yaw_rate = buf.get_f32_le();
28718        let tmp = buf.get_u16_le();
28719        __struct.type_mask = PositionTargetTypemask::from_bits(
28720            tmp & PositionTargetTypemask::all().bits(),
28721        )
28722        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28723            flag_type: "PositionTargetTypemask",
28724            value: tmp as u32,
28725        })?;
28726        let tmp = buf.get_u8();
28727        __struct.coordinate_frame =
28728            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28729                enum_type: "MavFrame",
28730                value: tmp as u32,
28731            })?;
28732        Ok(__struct)
28733    }
28734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28735        let mut __tmp = BytesMut::new(bytes);
28736        #[allow(clippy::absurd_extreme_comparisons)]
28737        #[allow(unused_comparisons)]
28738        if __tmp.remaining() < Self::ENCODED_LEN {
28739            panic!(
28740                "buffer is too small (need {} bytes, but got {})",
28741                Self::ENCODED_LEN,
28742                __tmp.remaining(),
28743            )
28744        }
28745        __tmp.put_u32_le(self.time_boot_ms);
28746        __tmp.put_i32_le(self.lat_int);
28747        __tmp.put_i32_le(self.lon_int);
28748        __tmp.put_f32_le(self.alt);
28749        __tmp.put_f32_le(self.vx);
28750        __tmp.put_f32_le(self.vy);
28751        __tmp.put_f32_le(self.vz);
28752        __tmp.put_f32_le(self.afx);
28753        __tmp.put_f32_le(self.afy);
28754        __tmp.put_f32_le(self.afz);
28755        __tmp.put_f32_le(self.yaw);
28756        __tmp.put_f32_le(self.yaw_rate);
28757        __tmp.put_u16_le(self.type_mask.bits());
28758        __tmp.put_u8(self.coordinate_frame as u8);
28759        if matches!(version, MavlinkVersion::V2) {
28760            let len = __tmp.len();
28761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28762        } else {
28763            __tmp.len()
28764        }
28765    }
28766}
28767#[doc = "id: 264"]
28768#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
28769#[derive(Debug, Clone, PartialEq)]
28770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28772pub struct FLIGHT_INFORMATION_DATA {
28773    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
28774    pub arming_time_utc: u64,
28775    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
28776    pub takeoff_time_utc: u64,
28777    #[doc = "Flight number. Note, field is misnamed UUID."]
28778    pub flight_uuid: u64,
28779    #[doc = "Timestamp (time since system boot)."]
28780    pub time_boot_ms: u32,
28781    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
28782    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28783    pub landing_time: u32,
28784}
28785impl FLIGHT_INFORMATION_DATA {
28786    pub const ENCODED_LEN: usize = 32usize;
28787    pub const DEFAULT: Self = Self {
28788        arming_time_utc: 0_u64,
28789        takeoff_time_utc: 0_u64,
28790        flight_uuid: 0_u64,
28791        time_boot_ms: 0_u32,
28792        landing_time: 0_u32,
28793    };
28794    #[cfg(feature = "arbitrary")]
28795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28796        use arbitrary::{Arbitrary, Unstructured};
28797        let mut buf = [0u8; 1024];
28798        rng.fill_bytes(&mut buf);
28799        let mut unstructured = Unstructured::new(&buf);
28800        Self::arbitrary(&mut unstructured).unwrap_or_default()
28801    }
28802}
28803impl Default for FLIGHT_INFORMATION_DATA {
28804    fn default() -> Self {
28805        Self::DEFAULT.clone()
28806    }
28807}
28808impl MessageData for FLIGHT_INFORMATION_DATA {
28809    type Message = MavMessage;
28810    const ID: u32 = 264u32;
28811    const NAME: &'static str = "FLIGHT_INFORMATION";
28812    const EXTRA_CRC: u8 = 49u8;
28813    const ENCODED_LEN: usize = 32usize;
28814    fn deser(
28815        _version: MavlinkVersion,
28816        __input: &[u8],
28817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28818        let avail_len = __input.len();
28819        let mut payload_buf = [0; Self::ENCODED_LEN];
28820        let mut buf = if avail_len < Self::ENCODED_LEN {
28821            payload_buf[0..avail_len].copy_from_slice(__input);
28822            Bytes::new(&payload_buf)
28823        } else {
28824            Bytes::new(__input)
28825        };
28826        let mut __struct = Self::default();
28827        __struct.arming_time_utc = buf.get_u64_le();
28828        __struct.takeoff_time_utc = buf.get_u64_le();
28829        __struct.flight_uuid = buf.get_u64_le();
28830        __struct.time_boot_ms = buf.get_u32_le();
28831        __struct.landing_time = buf.get_u32_le();
28832        Ok(__struct)
28833    }
28834    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28835        let mut __tmp = BytesMut::new(bytes);
28836        #[allow(clippy::absurd_extreme_comparisons)]
28837        #[allow(unused_comparisons)]
28838        if __tmp.remaining() < Self::ENCODED_LEN {
28839            panic!(
28840                "buffer is too small (need {} bytes, but got {})",
28841                Self::ENCODED_LEN,
28842                __tmp.remaining(),
28843            )
28844        }
28845        __tmp.put_u64_le(self.arming_time_utc);
28846        __tmp.put_u64_le(self.takeoff_time_utc);
28847        __tmp.put_u64_le(self.flight_uuid);
28848        __tmp.put_u32_le(self.time_boot_ms);
28849        __tmp.put_u32_le(self.landing_time);
28850        if matches!(version, MavlinkVersion::V2) {
28851            let len = __tmp.len();
28852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28853        } else {
28854            __tmp.len()
28855        }
28856    }
28857}
28858#[doc = "id: 2"]
28859#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
28860#[derive(Debug, Clone, PartialEq)]
28861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28863pub struct SYSTEM_TIME_DATA {
28864    #[doc = "Timestamp (UNIX epoch time)."]
28865    pub time_unix_usec: u64,
28866    #[doc = "Timestamp (time since system boot)."]
28867    pub time_boot_ms: u32,
28868}
28869impl SYSTEM_TIME_DATA {
28870    pub const ENCODED_LEN: usize = 12usize;
28871    pub const DEFAULT: Self = Self {
28872        time_unix_usec: 0_u64,
28873        time_boot_ms: 0_u32,
28874    };
28875    #[cfg(feature = "arbitrary")]
28876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28877        use arbitrary::{Arbitrary, Unstructured};
28878        let mut buf = [0u8; 1024];
28879        rng.fill_bytes(&mut buf);
28880        let mut unstructured = Unstructured::new(&buf);
28881        Self::arbitrary(&mut unstructured).unwrap_or_default()
28882    }
28883}
28884impl Default for SYSTEM_TIME_DATA {
28885    fn default() -> Self {
28886        Self::DEFAULT.clone()
28887    }
28888}
28889impl MessageData for SYSTEM_TIME_DATA {
28890    type Message = MavMessage;
28891    const ID: u32 = 2u32;
28892    const NAME: &'static str = "SYSTEM_TIME";
28893    const EXTRA_CRC: u8 = 137u8;
28894    const ENCODED_LEN: usize = 12usize;
28895    fn deser(
28896        _version: MavlinkVersion,
28897        __input: &[u8],
28898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28899        let avail_len = __input.len();
28900        let mut payload_buf = [0; Self::ENCODED_LEN];
28901        let mut buf = if avail_len < Self::ENCODED_LEN {
28902            payload_buf[0..avail_len].copy_from_slice(__input);
28903            Bytes::new(&payload_buf)
28904        } else {
28905            Bytes::new(__input)
28906        };
28907        let mut __struct = Self::default();
28908        __struct.time_unix_usec = buf.get_u64_le();
28909        __struct.time_boot_ms = buf.get_u32_le();
28910        Ok(__struct)
28911    }
28912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28913        let mut __tmp = BytesMut::new(bytes);
28914        #[allow(clippy::absurd_extreme_comparisons)]
28915        #[allow(unused_comparisons)]
28916        if __tmp.remaining() < Self::ENCODED_LEN {
28917            panic!(
28918                "buffer is too small (need {} bytes, but got {})",
28919                Self::ENCODED_LEN,
28920                __tmp.remaining(),
28921            )
28922        }
28923        __tmp.put_u64_le(self.time_unix_usec);
28924        __tmp.put_u32_le(self.time_boot_ms);
28925        if matches!(version, MavlinkVersion::V2) {
28926            let len = __tmp.len();
28927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28928        } else {
28929            __tmp.len()
28930        }
28931    }
28932}
28933#[doc = "id: 252"]
28934#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
28935#[derive(Debug, Clone, PartialEq)]
28936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28938pub struct NAMED_VALUE_INT_DATA {
28939    #[doc = "Timestamp (time since system boot)."]
28940    pub time_boot_ms: u32,
28941    #[doc = "Signed integer value"]
28942    pub value: i32,
28943    #[doc = "Name of the debug variable"]
28944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28945    pub name: [u8; 10],
28946}
28947impl NAMED_VALUE_INT_DATA {
28948    pub const ENCODED_LEN: usize = 18usize;
28949    pub const DEFAULT: Self = Self {
28950        time_boot_ms: 0_u32,
28951        value: 0_i32,
28952        name: [0_u8; 10usize],
28953    };
28954    #[cfg(feature = "arbitrary")]
28955    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28956        use arbitrary::{Arbitrary, Unstructured};
28957        let mut buf = [0u8; 1024];
28958        rng.fill_bytes(&mut buf);
28959        let mut unstructured = Unstructured::new(&buf);
28960        Self::arbitrary(&mut unstructured).unwrap_or_default()
28961    }
28962}
28963impl Default for NAMED_VALUE_INT_DATA {
28964    fn default() -> Self {
28965        Self::DEFAULT.clone()
28966    }
28967}
28968impl MessageData for NAMED_VALUE_INT_DATA {
28969    type Message = MavMessage;
28970    const ID: u32 = 252u32;
28971    const NAME: &'static str = "NAMED_VALUE_INT";
28972    const EXTRA_CRC: u8 = 44u8;
28973    const ENCODED_LEN: usize = 18usize;
28974    fn deser(
28975        _version: MavlinkVersion,
28976        __input: &[u8],
28977    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28978        let avail_len = __input.len();
28979        let mut payload_buf = [0; Self::ENCODED_LEN];
28980        let mut buf = if avail_len < Self::ENCODED_LEN {
28981            payload_buf[0..avail_len].copy_from_slice(__input);
28982            Bytes::new(&payload_buf)
28983        } else {
28984            Bytes::new(__input)
28985        };
28986        let mut __struct = Self::default();
28987        __struct.time_boot_ms = buf.get_u32_le();
28988        __struct.value = buf.get_i32_le();
28989        for v in &mut __struct.name {
28990            let val = buf.get_u8();
28991            *v = val;
28992        }
28993        Ok(__struct)
28994    }
28995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28996        let mut __tmp = BytesMut::new(bytes);
28997        #[allow(clippy::absurd_extreme_comparisons)]
28998        #[allow(unused_comparisons)]
28999        if __tmp.remaining() < Self::ENCODED_LEN {
29000            panic!(
29001                "buffer is too small (need {} bytes, but got {})",
29002                Self::ENCODED_LEN,
29003                __tmp.remaining(),
29004            )
29005        }
29006        __tmp.put_u32_le(self.time_boot_ms);
29007        __tmp.put_i32_le(self.value);
29008        for val in &self.name {
29009            __tmp.put_u8(*val);
29010        }
29011        if matches!(version, MavlinkVersion::V2) {
29012            let len = __tmp.len();
29013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29014        } else {
29015            __tmp.len()
29016        }
29017    }
29018}
29019#[doc = "id: 251"]
29020#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
29021#[derive(Debug, Clone, PartialEq)]
29022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29024pub struct NAMED_VALUE_FLOAT_DATA {
29025    #[doc = "Timestamp (time since system boot)."]
29026    pub time_boot_ms: u32,
29027    #[doc = "Floating point value"]
29028    pub value: f32,
29029    #[doc = "Name of the debug variable"]
29030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29031    pub name: [u8; 10],
29032}
29033impl NAMED_VALUE_FLOAT_DATA {
29034    pub const ENCODED_LEN: usize = 18usize;
29035    pub const DEFAULT: Self = Self {
29036        time_boot_ms: 0_u32,
29037        value: 0.0_f32,
29038        name: [0_u8; 10usize],
29039    };
29040    #[cfg(feature = "arbitrary")]
29041    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29042        use arbitrary::{Arbitrary, Unstructured};
29043        let mut buf = [0u8; 1024];
29044        rng.fill_bytes(&mut buf);
29045        let mut unstructured = Unstructured::new(&buf);
29046        Self::arbitrary(&mut unstructured).unwrap_or_default()
29047    }
29048}
29049impl Default for NAMED_VALUE_FLOAT_DATA {
29050    fn default() -> Self {
29051        Self::DEFAULT.clone()
29052    }
29053}
29054impl MessageData for NAMED_VALUE_FLOAT_DATA {
29055    type Message = MavMessage;
29056    const ID: u32 = 251u32;
29057    const NAME: &'static str = "NAMED_VALUE_FLOAT";
29058    const EXTRA_CRC: u8 = 170u8;
29059    const ENCODED_LEN: usize = 18usize;
29060    fn deser(
29061        _version: MavlinkVersion,
29062        __input: &[u8],
29063    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29064        let avail_len = __input.len();
29065        let mut payload_buf = [0; Self::ENCODED_LEN];
29066        let mut buf = if avail_len < Self::ENCODED_LEN {
29067            payload_buf[0..avail_len].copy_from_slice(__input);
29068            Bytes::new(&payload_buf)
29069        } else {
29070            Bytes::new(__input)
29071        };
29072        let mut __struct = Self::default();
29073        __struct.time_boot_ms = buf.get_u32_le();
29074        __struct.value = buf.get_f32_le();
29075        for v in &mut __struct.name {
29076            let val = buf.get_u8();
29077            *v = val;
29078        }
29079        Ok(__struct)
29080    }
29081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29082        let mut __tmp = BytesMut::new(bytes);
29083        #[allow(clippy::absurd_extreme_comparisons)]
29084        #[allow(unused_comparisons)]
29085        if __tmp.remaining() < Self::ENCODED_LEN {
29086            panic!(
29087                "buffer is too small (need {} bytes, but got {})",
29088                Self::ENCODED_LEN,
29089                __tmp.remaining(),
29090            )
29091        }
29092        __tmp.put_u32_le(self.time_boot_ms);
29093        __tmp.put_f32_le(self.value);
29094        for val in &self.name {
29095            __tmp.put_u8(*val);
29096        }
29097        if matches!(version, MavlinkVersion::V2) {
29098            let len = __tmp.len();
29099            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29100        } else {
29101            __tmp.len()
29102        }
29103    }
29104}
29105#[doc = "id: 129"]
29106#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
29107#[derive(Debug, Clone, PartialEq)]
29108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29110pub struct SCALED_IMU3_DATA {
29111    #[doc = "Timestamp (time since system boot)."]
29112    pub time_boot_ms: u32,
29113    #[doc = "X acceleration"]
29114    pub xacc: i16,
29115    #[doc = "Y acceleration"]
29116    pub yacc: i16,
29117    #[doc = "Z acceleration"]
29118    pub zacc: i16,
29119    #[doc = "Angular speed around X axis"]
29120    pub xgyro: i16,
29121    #[doc = "Angular speed around Y axis"]
29122    pub ygyro: i16,
29123    #[doc = "Angular speed around Z axis"]
29124    pub zgyro: i16,
29125    #[doc = "X Magnetic field"]
29126    pub xmag: i16,
29127    #[doc = "Y Magnetic field"]
29128    pub ymag: i16,
29129    #[doc = "Z Magnetic field"]
29130    pub zmag: i16,
29131    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29133    pub temperature: i16,
29134}
29135impl SCALED_IMU3_DATA {
29136    pub const ENCODED_LEN: usize = 24usize;
29137    pub const DEFAULT: Self = Self {
29138        time_boot_ms: 0_u32,
29139        xacc: 0_i16,
29140        yacc: 0_i16,
29141        zacc: 0_i16,
29142        xgyro: 0_i16,
29143        ygyro: 0_i16,
29144        zgyro: 0_i16,
29145        xmag: 0_i16,
29146        ymag: 0_i16,
29147        zmag: 0_i16,
29148        temperature: 0_i16,
29149    };
29150    #[cfg(feature = "arbitrary")]
29151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29152        use arbitrary::{Arbitrary, Unstructured};
29153        let mut buf = [0u8; 1024];
29154        rng.fill_bytes(&mut buf);
29155        let mut unstructured = Unstructured::new(&buf);
29156        Self::arbitrary(&mut unstructured).unwrap_or_default()
29157    }
29158}
29159impl Default for SCALED_IMU3_DATA {
29160    fn default() -> Self {
29161        Self::DEFAULT.clone()
29162    }
29163}
29164impl MessageData for SCALED_IMU3_DATA {
29165    type Message = MavMessage;
29166    const ID: u32 = 129u32;
29167    const NAME: &'static str = "SCALED_IMU3";
29168    const EXTRA_CRC: u8 = 46u8;
29169    const ENCODED_LEN: usize = 24usize;
29170    fn deser(
29171        _version: MavlinkVersion,
29172        __input: &[u8],
29173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29174        let avail_len = __input.len();
29175        let mut payload_buf = [0; Self::ENCODED_LEN];
29176        let mut buf = if avail_len < Self::ENCODED_LEN {
29177            payload_buf[0..avail_len].copy_from_slice(__input);
29178            Bytes::new(&payload_buf)
29179        } else {
29180            Bytes::new(__input)
29181        };
29182        let mut __struct = Self::default();
29183        __struct.time_boot_ms = buf.get_u32_le();
29184        __struct.xacc = buf.get_i16_le();
29185        __struct.yacc = buf.get_i16_le();
29186        __struct.zacc = buf.get_i16_le();
29187        __struct.xgyro = buf.get_i16_le();
29188        __struct.ygyro = buf.get_i16_le();
29189        __struct.zgyro = buf.get_i16_le();
29190        __struct.xmag = buf.get_i16_le();
29191        __struct.ymag = buf.get_i16_le();
29192        __struct.zmag = buf.get_i16_le();
29193        __struct.temperature = buf.get_i16_le();
29194        Ok(__struct)
29195    }
29196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29197        let mut __tmp = BytesMut::new(bytes);
29198        #[allow(clippy::absurd_extreme_comparisons)]
29199        #[allow(unused_comparisons)]
29200        if __tmp.remaining() < Self::ENCODED_LEN {
29201            panic!(
29202                "buffer is too small (need {} bytes, but got {})",
29203                Self::ENCODED_LEN,
29204                __tmp.remaining(),
29205            )
29206        }
29207        __tmp.put_u32_le(self.time_boot_ms);
29208        __tmp.put_i16_le(self.xacc);
29209        __tmp.put_i16_le(self.yacc);
29210        __tmp.put_i16_le(self.zacc);
29211        __tmp.put_i16_le(self.xgyro);
29212        __tmp.put_i16_le(self.ygyro);
29213        __tmp.put_i16_le(self.zgyro);
29214        __tmp.put_i16_le(self.xmag);
29215        __tmp.put_i16_le(self.ymag);
29216        __tmp.put_i16_le(self.zmag);
29217        __tmp.put_i16_le(self.temperature);
29218        if matches!(version, MavlinkVersion::V2) {
29219            let len = __tmp.len();
29220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29221        } else {
29222            __tmp.len()
29223        }
29224    }
29225}
29226#[doc = "id: 76"]
29227#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
29228#[derive(Debug, Clone, PartialEq)]
29229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29231pub struct COMMAND_LONG_DATA {
29232    #[doc = "Parameter 1 (for the specific command)."]
29233    pub param1: f32,
29234    #[doc = "Parameter 2 (for the specific command)."]
29235    pub param2: f32,
29236    #[doc = "Parameter 3 (for the specific command)."]
29237    pub param3: f32,
29238    #[doc = "Parameter 4 (for the specific command)."]
29239    pub param4: f32,
29240    #[doc = "Parameter 5 (for the specific command)."]
29241    pub param5: f32,
29242    #[doc = "Parameter 6 (for the specific command)."]
29243    pub param6: f32,
29244    #[doc = "Parameter 7 (for the specific command)."]
29245    pub param7: f32,
29246    #[doc = "Command ID (of command to send)."]
29247    pub command: MavCmd,
29248    #[doc = "System which should execute the command"]
29249    pub target_system: u8,
29250    #[doc = "Component which should execute the command, 0 for all components"]
29251    pub target_component: u8,
29252    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
29253    pub confirmation: u8,
29254}
29255impl COMMAND_LONG_DATA {
29256    pub const ENCODED_LEN: usize = 33usize;
29257    pub const DEFAULT: Self = Self {
29258        param1: 0.0_f32,
29259        param2: 0.0_f32,
29260        param3: 0.0_f32,
29261        param4: 0.0_f32,
29262        param5: 0.0_f32,
29263        param6: 0.0_f32,
29264        param7: 0.0_f32,
29265        command: MavCmd::DEFAULT,
29266        target_system: 0_u8,
29267        target_component: 0_u8,
29268        confirmation: 0_u8,
29269    };
29270    #[cfg(feature = "arbitrary")]
29271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29272        use arbitrary::{Arbitrary, Unstructured};
29273        let mut buf = [0u8; 1024];
29274        rng.fill_bytes(&mut buf);
29275        let mut unstructured = Unstructured::new(&buf);
29276        Self::arbitrary(&mut unstructured).unwrap_or_default()
29277    }
29278}
29279impl Default for COMMAND_LONG_DATA {
29280    fn default() -> Self {
29281        Self::DEFAULT.clone()
29282    }
29283}
29284impl MessageData for COMMAND_LONG_DATA {
29285    type Message = MavMessage;
29286    const ID: u32 = 76u32;
29287    const NAME: &'static str = "COMMAND_LONG";
29288    const EXTRA_CRC: u8 = 152u8;
29289    const ENCODED_LEN: usize = 33usize;
29290    fn deser(
29291        _version: MavlinkVersion,
29292        __input: &[u8],
29293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29294        let avail_len = __input.len();
29295        let mut payload_buf = [0; Self::ENCODED_LEN];
29296        let mut buf = if avail_len < Self::ENCODED_LEN {
29297            payload_buf[0..avail_len].copy_from_slice(__input);
29298            Bytes::new(&payload_buf)
29299        } else {
29300            Bytes::new(__input)
29301        };
29302        let mut __struct = Self::default();
29303        __struct.param1 = buf.get_f32_le();
29304        __struct.param2 = buf.get_f32_le();
29305        __struct.param3 = buf.get_f32_le();
29306        __struct.param4 = buf.get_f32_le();
29307        __struct.param5 = buf.get_f32_le();
29308        __struct.param6 = buf.get_f32_le();
29309        __struct.param7 = buf.get_f32_le();
29310        let tmp = buf.get_u16_le();
29311        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
29312            ::mavlink_core::error::ParserError::InvalidEnum {
29313                enum_type: "MavCmd",
29314                value: tmp as u32,
29315            },
29316        )?;
29317        __struct.target_system = buf.get_u8();
29318        __struct.target_component = buf.get_u8();
29319        __struct.confirmation = buf.get_u8();
29320        Ok(__struct)
29321    }
29322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29323        let mut __tmp = BytesMut::new(bytes);
29324        #[allow(clippy::absurd_extreme_comparisons)]
29325        #[allow(unused_comparisons)]
29326        if __tmp.remaining() < Self::ENCODED_LEN {
29327            panic!(
29328                "buffer is too small (need {} bytes, but got {})",
29329                Self::ENCODED_LEN,
29330                __tmp.remaining(),
29331            )
29332        }
29333        __tmp.put_f32_le(self.param1);
29334        __tmp.put_f32_le(self.param2);
29335        __tmp.put_f32_le(self.param3);
29336        __tmp.put_f32_le(self.param4);
29337        __tmp.put_f32_le(self.param5);
29338        __tmp.put_f32_le(self.param6);
29339        __tmp.put_f32_le(self.param7);
29340        __tmp.put_u16_le(self.command as u16);
29341        __tmp.put_u8(self.target_system);
29342        __tmp.put_u8(self.target_component);
29343        __tmp.put_u8(self.confirmation);
29344        if matches!(version, MavlinkVersion::V2) {
29345            let len = __tmp.len();
29346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29347        } else {
29348            __tmp.len()
29349        }
29350    }
29351}
29352#[doc = "id: 113"]
29353#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
29354#[derive(Debug, Clone, PartialEq)]
29355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29357pub struct HIL_GPS_DATA {
29358    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29359    pub time_usec: u64,
29360    #[doc = "Latitude (WGS84)"]
29361    pub lat: i32,
29362    #[doc = "Longitude (WGS84)"]
29363    pub lon: i32,
29364    #[doc = "Altitude (MSL). Positive for up."]
29365    pub alt: i32,
29366    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
29367    pub eph: u16,
29368    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
29369    pub epv: u16,
29370    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
29371    pub vel: u16,
29372    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
29373    pub vn: i16,
29374    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
29375    pub ve: i16,
29376    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
29377    pub vd: i16,
29378    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
29379    pub cog: u16,
29380    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
29381    pub fix_type: u8,
29382    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
29383    pub satellites_visible: u8,
29384    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
29385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29386    pub id: u8,
29387    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
29388    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29389    pub yaw: u16,
29390}
29391impl HIL_GPS_DATA {
29392    pub const ENCODED_LEN: usize = 39usize;
29393    pub const DEFAULT: Self = Self {
29394        time_usec: 0_u64,
29395        lat: 0_i32,
29396        lon: 0_i32,
29397        alt: 0_i32,
29398        eph: 0_u16,
29399        epv: 0_u16,
29400        vel: 0_u16,
29401        vn: 0_i16,
29402        ve: 0_i16,
29403        vd: 0_i16,
29404        cog: 0_u16,
29405        fix_type: 0_u8,
29406        satellites_visible: 0_u8,
29407        id: 0_u8,
29408        yaw: 0_u16,
29409    };
29410    #[cfg(feature = "arbitrary")]
29411    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29412        use arbitrary::{Arbitrary, Unstructured};
29413        let mut buf = [0u8; 1024];
29414        rng.fill_bytes(&mut buf);
29415        let mut unstructured = Unstructured::new(&buf);
29416        Self::arbitrary(&mut unstructured).unwrap_or_default()
29417    }
29418}
29419impl Default for HIL_GPS_DATA {
29420    fn default() -> Self {
29421        Self::DEFAULT.clone()
29422    }
29423}
29424impl MessageData for HIL_GPS_DATA {
29425    type Message = MavMessage;
29426    const ID: u32 = 113u32;
29427    const NAME: &'static str = "HIL_GPS";
29428    const EXTRA_CRC: u8 = 124u8;
29429    const ENCODED_LEN: usize = 39usize;
29430    fn deser(
29431        _version: MavlinkVersion,
29432        __input: &[u8],
29433    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29434        let avail_len = __input.len();
29435        let mut payload_buf = [0; Self::ENCODED_LEN];
29436        let mut buf = if avail_len < Self::ENCODED_LEN {
29437            payload_buf[0..avail_len].copy_from_slice(__input);
29438            Bytes::new(&payload_buf)
29439        } else {
29440            Bytes::new(__input)
29441        };
29442        let mut __struct = Self::default();
29443        __struct.time_usec = buf.get_u64_le();
29444        __struct.lat = buf.get_i32_le();
29445        __struct.lon = buf.get_i32_le();
29446        __struct.alt = buf.get_i32_le();
29447        __struct.eph = buf.get_u16_le();
29448        __struct.epv = buf.get_u16_le();
29449        __struct.vel = buf.get_u16_le();
29450        __struct.vn = buf.get_i16_le();
29451        __struct.ve = buf.get_i16_le();
29452        __struct.vd = buf.get_i16_le();
29453        __struct.cog = buf.get_u16_le();
29454        __struct.fix_type = buf.get_u8();
29455        __struct.satellites_visible = buf.get_u8();
29456        __struct.id = buf.get_u8();
29457        __struct.yaw = buf.get_u16_le();
29458        Ok(__struct)
29459    }
29460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29461        let mut __tmp = BytesMut::new(bytes);
29462        #[allow(clippy::absurd_extreme_comparisons)]
29463        #[allow(unused_comparisons)]
29464        if __tmp.remaining() < Self::ENCODED_LEN {
29465            panic!(
29466                "buffer is too small (need {} bytes, but got {})",
29467                Self::ENCODED_LEN,
29468                __tmp.remaining(),
29469            )
29470        }
29471        __tmp.put_u64_le(self.time_usec);
29472        __tmp.put_i32_le(self.lat);
29473        __tmp.put_i32_le(self.lon);
29474        __tmp.put_i32_le(self.alt);
29475        __tmp.put_u16_le(self.eph);
29476        __tmp.put_u16_le(self.epv);
29477        __tmp.put_u16_le(self.vel);
29478        __tmp.put_i16_le(self.vn);
29479        __tmp.put_i16_le(self.ve);
29480        __tmp.put_i16_le(self.vd);
29481        __tmp.put_u16_le(self.cog);
29482        __tmp.put_u8(self.fix_type);
29483        __tmp.put_u8(self.satellites_visible);
29484        __tmp.put_u8(self.id);
29485        __tmp.put_u16_le(self.yaw);
29486        if matches!(version, MavlinkVersion::V2) {
29487            let len = __tmp.len();
29488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29489        } else {
29490            __tmp.len()
29491        }
29492    }
29493}
29494#[doc = "id: 222"]
29495#[doc = "System status specific to ualberta uav."]
29496#[derive(Debug, Clone, PartialEq)]
29497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29499pub struct UALBERTA_SYS_STATUS_DATA {
29500    #[doc = "System mode, see UALBERTA_AUTOPILOT_MODE ENUM"]
29501    pub mode: u8,
29502    #[doc = "Navigation mode, see UALBERTA_NAV_MODE ENUM"]
29503    pub nav_mode: u8,
29504    #[doc = "Pilot mode, see UALBERTA_PILOT_MODE"]
29505    pub pilot: u8,
29506}
29507impl UALBERTA_SYS_STATUS_DATA {
29508    pub const ENCODED_LEN: usize = 3usize;
29509    pub const DEFAULT: Self = Self {
29510        mode: 0_u8,
29511        nav_mode: 0_u8,
29512        pilot: 0_u8,
29513    };
29514    #[cfg(feature = "arbitrary")]
29515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29516        use arbitrary::{Arbitrary, Unstructured};
29517        let mut buf = [0u8; 1024];
29518        rng.fill_bytes(&mut buf);
29519        let mut unstructured = Unstructured::new(&buf);
29520        Self::arbitrary(&mut unstructured).unwrap_or_default()
29521    }
29522}
29523impl Default for UALBERTA_SYS_STATUS_DATA {
29524    fn default() -> Self {
29525        Self::DEFAULT.clone()
29526    }
29527}
29528impl MessageData for UALBERTA_SYS_STATUS_DATA {
29529    type Message = MavMessage;
29530    const ID: u32 = 222u32;
29531    const NAME: &'static str = "UALBERTA_SYS_STATUS";
29532    const EXTRA_CRC: u8 = 15u8;
29533    const ENCODED_LEN: usize = 3usize;
29534    fn deser(
29535        _version: MavlinkVersion,
29536        __input: &[u8],
29537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29538        let avail_len = __input.len();
29539        let mut payload_buf = [0; Self::ENCODED_LEN];
29540        let mut buf = if avail_len < Self::ENCODED_LEN {
29541            payload_buf[0..avail_len].copy_from_slice(__input);
29542            Bytes::new(&payload_buf)
29543        } else {
29544            Bytes::new(__input)
29545        };
29546        let mut __struct = Self::default();
29547        __struct.mode = buf.get_u8();
29548        __struct.nav_mode = buf.get_u8();
29549        __struct.pilot = buf.get_u8();
29550        Ok(__struct)
29551    }
29552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29553        let mut __tmp = BytesMut::new(bytes);
29554        #[allow(clippy::absurd_extreme_comparisons)]
29555        #[allow(unused_comparisons)]
29556        if __tmp.remaining() < Self::ENCODED_LEN {
29557            panic!(
29558                "buffer is too small (need {} bytes, but got {})",
29559                Self::ENCODED_LEN,
29560                __tmp.remaining(),
29561            )
29562        }
29563        __tmp.put_u8(self.mode);
29564        __tmp.put_u8(self.nav_mode);
29565        __tmp.put_u8(self.pilot);
29566        if matches!(version, MavlinkVersion::V2) {
29567            let len = __tmp.len();
29568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29569        } else {
29570            __tmp.len()
29571        }
29572    }
29573}
29574#[doc = "id: 334"]
29575#[doc = "Report current used cellular network status."]
29576#[derive(Debug, Clone, PartialEq)]
29577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29579pub struct CELLULAR_STATUS_DATA {
29580    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
29581    pub mcc: u16,
29582    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
29583    pub mnc: u16,
29584    #[doc = "Location area code. If unknown, set to 0"]
29585    pub lac: u16,
29586    #[doc = "Cellular modem status"]
29587    pub status: CellularStatusFlag,
29588    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
29589    pub failure_reason: CellularNetworkFailedReason,
29590    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
29591    pub mavtype: CellularNetworkRadioType,
29592    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
29593    pub quality: u8,
29594}
29595impl CELLULAR_STATUS_DATA {
29596    pub const ENCODED_LEN: usize = 10usize;
29597    pub const DEFAULT: Self = Self {
29598        mcc: 0_u16,
29599        mnc: 0_u16,
29600        lac: 0_u16,
29601        status: CellularStatusFlag::DEFAULT,
29602        failure_reason: CellularNetworkFailedReason::DEFAULT,
29603        mavtype: CellularNetworkRadioType::DEFAULT,
29604        quality: 0_u8,
29605    };
29606    #[cfg(feature = "arbitrary")]
29607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29608        use arbitrary::{Arbitrary, Unstructured};
29609        let mut buf = [0u8; 1024];
29610        rng.fill_bytes(&mut buf);
29611        let mut unstructured = Unstructured::new(&buf);
29612        Self::arbitrary(&mut unstructured).unwrap_or_default()
29613    }
29614}
29615impl Default for CELLULAR_STATUS_DATA {
29616    fn default() -> Self {
29617        Self::DEFAULT.clone()
29618    }
29619}
29620impl MessageData for CELLULAR_STATUS_DATA {
29621    type Message = MavMessage;
29622    const ID: u32 = 334u32;
29623    const NAME: &'static str = "CELLULAR_STATUS";
29624    const EXTRA_CRC: u8 = 72u8;
29625    const ENCODED_LEN: usize = 10usize;
29626    fn deser(
29627        _version: MavlinkVersion,
29628        __input: &[u8],
29629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29630        let avail_len = __input.len();
29631        let mut payload_buf = [0; Self::ENCODED_LEN];
29632        let mut buf = if avail_len < Self::ENCODED_LEN {
29633            payload_buf[0..avail_len].copy_from_slice(__input);
29634            Bytes::new(&payload_buf)
29635        } else {
29636            Bytes::new(__input)
29637        };
29638        let mut __struct = Self::default();
29639        __struct.mcc = buf.get_u16_le();
29640        __struct.mnc = buf.get_u16_le();
29641        __struct.lac = buf.get_u16_le();
29642        let tmp = buf.get_u8();
29643        __struct.status =
29644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29645                enum_type: "CellularStatusFlag",
29646                value: tmp as u32,
29647            })?;
29648        let tmp = buf.get_u8();
29649        __struct.failure_reason =
29650            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29651                enum_type: "CellularNetworkFailedReason",
29652                value: tmp as u32,
29653            })?;
29654        let tmp = buf.get_u8();
29655        __struct.mavtype =
29656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29657                enum_type: "CellularNetworkRadioType",
29658                value: tmp as u32,
29659            })?;
29660        __struct.quality = buf.get_u8();
29661        Ok(__struct)
29662    }
29663    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29664        let mut __tmp = BytesMut::new(bytes);
29665        #[allow(clippy::absurd_extreme_comparisons)]
29666        #[allow(unused_comparisons)]
29667        if __tmp.remaining() < Self::ENCODED_LEN {
29668            panic!(
29669                "buffer is too small (need {} bytes, but got {})",
29670                Self::ENCODED_LEN,
29671                __tmp.remaining(),
29672            )
29673        }
29674        __tmp.put_u16_le(self.mcc);
29675        __tmp.put_u16_le(self.mnc);
29676        __tmp.put_u16_le(self.lac);
29677        __tmp.put_u8(self.status as u8);
29678        __tmp.put_u8(self.failure_reason as u8);
29679        __tmp.put_u8(self.mavtype as u8);
29680        __tmp.put_u8(self.quality);
29681        if matches!(version, MavlinkVersion::V2) {
29682            let len = __tmp.len();
29683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29684        } else {
29685            __tmp.len()
29686        }
29687    }
29688}
29689#[doc = "id: 105"]
29690#[doc = "The IMU readings in SI units in NED body frame."]
29691#[derive(Debug, Clone, PartialEq)]
29692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29693#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29694pub struct HIGHRES_IMU_DATA {
29695    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29696    pub time_usec: u64,
29697    #[doc = "X acceleration"]
29698    pub xacc: f32,
29699    #[doc = "Y acceleration"]
29700    pub yacc: f32,
29701    #[doc = "Z acceleration"]
29702    pub zacc: f32,
29703    #[doc = "Angular speed around X axis"]
29704    pub xgyro: f32,
29705    #[doc = "Angular speed around Y axis"]
29706    pub ygyro: f32,
29707    #[doc = "Angular speed around Z axis"]
29708    pub zgyro: f32,
29709    #[doc = "X Magnetic field"]
29710    pub xmag: f32,
29711    #[doc = "Y Magnetic field"]
29712    pub ymag: f32,
29713    #[doc = "Z Magnetic field"]
29714    pub zmag: f32,
29715    #[doc = "Absolute pressure"]
29716    pub abs_pressure: f32,
29717    #[doc = "Differential pressure"]
29718    pub diff_pressure: f32,
29719    #[doc = "Altitude calculated from pressure"]
29720    pub pressure_alt: f32,
29721    #[doc = "Temperature"]
29722    pub temperature: f32,
29723    #[doc = "Bitmap for fields that have updated since last message"]
29724    pub fields_updated: HighresImuUpdatedFlags,
29725    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
29726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29727    pub id: u8,
29728}
29729impl HIGHRES_IMU_DATA {
29730    pub const ENCODED_LEN: usize = 63usize;
29731    pub const DEFAULT: Self = Self {
29732        time_usec: 0_u64,
29733        xacc: 0.0_f32,
29734        yacc: 0.0_f32,
29735        zacc: 0.0_f32,
29736        xgyro: 0.0_f32,
29737        ygyro: 0.0_f32,
29738        zgyro: 0.0_f32,
29739        xmag: 0.0_f32,
29740        ymag: 0.0_f32,
29741        zmag: 0.0_f32,
29742        abs_pressure: 0.0_f32,
29743        diff_pressure: 0.0_f32,
29744        pressure_alt: 0.0_f32,
29745        temperature: 0.0_f32,
29746        fields_updated: HighresImuUpdatedFlags::DEFAULT,
29747        id: 0_u8,
29748    };
29749    #[cfg(feature = "arbitrary")]
29750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29751        use arbitrary::{Arbitrary, Unstructured};
29752        let mut buf = [0u8; 1024];
29753        rng.fill_bytes(&mut buf);
29754        let mut unstructured = Unstructured::new(&buf);
29755        Self::arbitrary(&mut unstructured).unwrap_or_default()
29756    }
29757}
29758impl Default for HIGHRES_IMU_DATA {
29759    fn default() -> Self {
29760        Self::DEFAULT.clone()
29761    }
29762}
29763impl MessageData for HIGHRES_IMU_DATA {
29764    type Message = MavMessage;
29765    const ID: u32 = 105u32;
29766    const NAME: &'static str = "HIGHRES_IMU";
29767    const EXTRA_CRC: u8 = 93u8;
29768    const ENCODED_LEN: usize = 63usize;
29769    fn deser(
29770        _version: MavlinkVersion,
29771        __input: &[u8],
29772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29773        let avail_len = __input.len();
29774        let mut payload_buf = [0; Self::ENCODED_LEN];
29775        let mut buf = if avail_len < Self::ENCODED_LEN {
29776            payload_buf[0..avail_len].copy_from_slice(__input);
29777            Bytes::new(&payload_buf)
29778        } else {
29779            Bytes::new(__input)
29780        };
29781        let mut __struct = Self::default();
29782        __struct.time_usec = buf.get_u64_le();
29783        __struct.xacc = buf.get_f32_le();
29784        __struct.yacc = buf.get_f32_le();
29785        __struct.zacc = buf.get_f32_le();
29786        __struct.xgyro = buf.get_f32_le();
29787        __struct.ygyro = buf.get_f32_le();
29788        __struct.zgyro = buf.get_f32_le();
29789        __struct.xmag = buf.get_f32_le();
29790        __struct.ymag = buf.get_f32_le();
29791        __struct.zmag = buf.get_f32_le();
29792        __struct.abs_pressure = buf.get_f32_le();
29793        __struct.diff_pressure = buf.get_f32_le();
29794        __struct.pressure_alt = buf.get_f32_le();
29795        __struct.temperature = buf.get_f32_le();
29796        let tmp = buf.get_u16_le();
29797        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
29798            tmp & HighresImuUpdatedFlags::all().bits(),
29799        )
29800        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29801            flag_type: "HighresImuUpdatedFlags",
29802            value: tmp as u32,
29803        })?;
29804        __struct.id = buf.get_u8();
29805        Ok(__struct)
29806    }
29807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29808        let mut __tmp = BytesMut::new(bytes);
29809        #[allow(clippy::absurd_extreme_comparisons)]
29810        #[allow(unused_comparisons)]
29811        if __tmp.remaining() < Self::ENCODED_LEN {
29812            panic!(
29813                "buffer is too small (need {} bytes, but got {})",
29814                Self::ENCODED_LEN,
29815                __tmp.remaining(),
29816            )
29817        }
29818        __tmp.put_u64_le(self.time_usec);
29819        __tmp.put_f32_le(self.xacc);
29820        __tmp.put_f32_le(self.yacc);
29821        __tmp.put_f32_le(self.zacc);
29822        __tmp.put_f32_le(self.xgyro);
29823        __tmp.put_f32_le(self.ygyro);
29824        __tmp.put_f32_le(self.zgyro);
29825        __tmp.put_f32_le(self.xmag);
29826        __tmp.put_f32_le(self.ymag);
29827        __tmp.put_f32_le(self.zmag);
29828        __tmp.put_f32_le(self.abs_pressure);
29829        __tmp.put_f32_le(self.diff_pressure);
29830        __tmp.put_f32_le(self.pressure_alt);
29831        __tmp.put_f32_le(self.temperature);
29832        __tmp.put_u16_le(self.fields_updated.bits());
29833        __tmp.put_u8(self.id);
29834        if matches!(version, MavlinkVersion::V2) {
29835            let len = __tmp.len();
29836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29837        } else {
29838            __tmp.len()
29839        }
29840    }
29841}
29842#[doc = "id: 65"]
29843#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
29844#[derive(Debug, Clone, PartialEq)]
29845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29847pub struct RC_CHANNELS_DATA {
29848    #[doc = "Timestamp (time since system boot)."]
29849    pub time_boot_ms: u32,
29850    #[doc = "RC channel 1 value."]
29851    pub chan1_raw: u16,
29852    #[doc = "RC channel 2 value."]
29853    pub chan2_raw: u16,
29854    #[doc = "RC channel 3 value."]
29855    pub chan3_raw: u16,
29856    #[doc = "RC channel 4 value."]
29857    pub chan4_raw: u16,
29858    #[doc = "RC channel 5 value."]
29859    pub chan5_raw: u16,
29860    #[doc = "RC channel 6 value."]
29861    pub chan6_raw: u16,
29862    #[doc = "RC channel 7 value."]
29863    pub chan7_raw: u16,
29864    #[doc = "RC channel 8 value."]
29865    pub chan8_raw: u16,
29866    #[doc = "RC channel 9 value."]
29867    pub chan9_raw: u16,
29868    #[doc = "RC channel 10 value."]
29869    pub chan10_raw: u16,
29870    #[doc = "RC channel 11 value."]
29871    pub chan11_raw: u16,
29872    #[doc = "RC channel 12 value."]
29873    pub chan12_raw: u16,
29874    #[doc = "RC channel 13 value."]
29875    pub chan13_raw: u16,
29876    #[doc = "RC channel 14 value."]
29877    pub chan14_raw: u16,
29878    #[doc = "RC channel 15 value."]
29879    pub chan15_raw: u16,
29880    #[doc = "RC channel 16 value."]
29881    pub chan16_raw: u16,
29882    #[doc = "RC channel 17 value."]
29883    pub chan17_raw: u16,
29884    #[doc = "RC channel 18 value."]
29885    pub chan18_raw: u16,
29886    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
29887    pub chancount: u8,
29888    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
29889    pub rssi: u8,
29890}
29891impl RC_CHANNELS_DATA {
29892    pub const ENCODED_LEN: usize = 42usize;
29893    pub const DEFAULT: Self = Self {
29894        time_boot_ms: 0_u32,
29895        chan1_raw: 0_u16,
29896        chan2_raw: 0_u16,
29897        chan3_raw: 0_u16,
29898        chan4_raw: 0_u16,
29899        chan5_raw: 0_u16,
29900        chan6_raw: 0_u16,
29901        chan7_raw: 0_u16,
29902        chan8_raw: 0_u16,
29903        chan9_raw: 0_u16,
29904        chan10_raw: 0_u16,
29905        chan11_raw: 0_u16,
29906        chan12_raw: 0_u16,
29907        chan13_raw: 0_u16,
29908        chan14_raw: 0_u16,
29909        chan15_raw: 0_u16,
29910        chan16_raw: 0_u16,
29911        chan17_raw: 0_u16,
29912        chan18_raw: 0_u16,
29913        chancount: 0_u8,
29914        rssi: 0_u8,
29915    };
29916    #[cfg(feature = "arbitrary")]
29917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29918        use arbitrary::{Arbitrary, Unstructured};
29919        let mut buf = [0u8; 1024];
29920        rng.fill_bytes(&mut buf);
29921        let mut unstructured = Unstructured::new(&buf);
29922        Self::arbitrary(&mut unstructured).unwrap_or_default()
29923    }
29924}
29925impl Default for RC_CHANNELS_DATA {
29926    fn default() -> Self {
29927        Self::DEFAULT.clone()
29928    }
29929}
29930impl MessageData for RC_CHANNELS_DATA {
29931    type Message = MavMessage;
29932    const ID: u32 = 65u32;
29933    const NAME: &'static str = "RC_CHANNELS";
29934    const EXTRA_CRC: u8 = 118u8;
29935    const ENCODED_LEN: usize = 42usize;
29936    fn deser(
29937        _version: MavlinkVersion,
29938        __input: &[u8],
29939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29940        let avail_len = __input.len();
29941        let mut payload_buf = [0; Self::ENCODED_LEN];
29942        let mut buf = if avail_len < Self::ENCODED_LEN {
29943            payload_buf[0..avail_len].copy_from_slice(__input);
29944            Bytes::new(&payload_buf)
29945        } else {
29946            Bytes::new(__input)
29947        };
29948        let mut __struct = Self::default();
29949        __struct.time_boot_ms = buf.get_u32_le();
29950        __struct.chan1_raw = buf.get_u16_le();
29951        __struct.chan2_raw = buf.get_u16_le();
29952        __struct.chan3_raw = buf.get_u16_le();
29953        __struct.chan4_raw = buf.get_u16_le();
29954        __struct.chan5_raw = buf.get_u16_le();
29955        __struct.chan6_raw = buf.get_u16_le();
29956        __struct.chan7_raw = buf.get_u16_le();
29957        __struct.chan8_raw = buf.get_u16_le();
29958        __struct.chan9_raw = buf.get_u16_le();
29959        __struct.chan10_raw = buf.get_u16_le();
29960        __struct.chan11_raw = buf.get_u16_le();
29961        __struct.chan12_raw = buf.get_u16_le();
29962        __struct.chan13_raw = buf.get_u16_le();
29963        __struct.chan14_raw = buf.get_u16_le();
29964        __struct.chan15_raw = buf.get_u16_le();
29965        __struct.chan16_raw = buf.get_u16_le();
29966        __struct.chan17_raw = buf.get_u16_le();
29967        __struct.chan18_raw = buf.get_u16_le();
29968        __struct.chancount = buf.get_u8();
29969        __struct.rssi = buf.get_u8();
29970        Ok(__struct)
29971    }
29972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29973        let mut __tmp = BytesMut::new(bytes);
29974        #[allow(clippy::absurd_extreme_comparisons)]
29975        #[allow(unused_comparisons)]
29976        if __tmp.remaining() < Self::ENCODED_LEN {
29977            panic!(
29978                "buffer is too small (need {} bytes, but got {})",
29979                Self::ENCODED_LEN,
29980                __tmp.remaining(),
29981            )
29982        }
29983        __tmp.put_u32_le(self.time_boot_ms);
29984        __tmp.put_u16_le(self.chan1_raw);
29985        __tmp.put_u16_le(self.chan2_raw);
29986        __tmp.put_u16_le(self.chan3_raw);
29987        __tmp.put_u16_le(self.chan4_raw);
29988        __tmp.put_u16_le(self.chan5_raw);
29989        __tmp.put_u16_le(self.chan6_raw);
29990        __tmp.put_u16_le(self.chan7_raw);
29991        __tmp.put_u16_le(self.chan8_raw);
29992        __tmp.put_u16_le(self.chan9_raw);
29993        __tmp.put_u16_le(self.chan10_raw);
29994        __tmp.put_u16_le(self.chan11_raw);
29995        __tmp.put_u16_le(self.chan12_raw);
29996        __tmp.put_u16_le(self.chan13_raw);
29997        __tmp.put_u16_le(self.chan14_raw);
29998        __tmp.put_u16_le(self.chan15_raw);
29999        __tmp.put_u16_le(self.chan16_raw);
30000        __tmp.put_u16_le(self.chan17_raw);
30001        __tmp.put_u16_le(self.chan18_raw);
30002        __tmp.put_u8(self.chancount);
30003        __tmp.put_u8(self.rssi);
30004        if matches!(version, MavlinkVersion::V2) {
30005            let len = __tmp.len();
30006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30007        } else {
30008            __tmp.len()
30009        }
30010    }
30011}
30012#[doc = "id: 324"]
30013#[doc = "Response from a PARAM_EXT_SET message."]
30014#[derive(Debug, Clone, PartialEq)]
30015#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30017pub struct PARAM_EXT_ACK_DATA {
30018    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
30019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30020    pub param_id: [u8; 16],
30021    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
30022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30023    pub param_value: [u8; 128],
30024    #[doc = "Parameter type."]
30025    pub param_type: MavParamExtType,
30026    #[doc = "Result code."]
30027    pub param_result: ParamAck,
30028}
30029impl PARAM_EXT_ACK_DATA {
30030    pub const ENCODED_LEN: usize = 146usize;
30031    pub const DEFAULT: Self = Self {
30032        param_id: [0_u8; 16usize],
30033        param_value: [0_u8; 128usize],
30034        param_type: MavParamExtType::DEFAULT,
30035        param_result: ParamAck::DEFAULT,
30036    };
30037    #[cfg(feature = "arbitrary")]
30038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30039        use arbitrary::{Arbitrary, Unstructured};
30040        let mut buf = [0u8; 1024];
30041        rng.fill_bytes(&mut buf);
30042        let mut unstructured = Unstructured::new(&buf);
30043        Self::arbitrary(&mut unstructured).unwrap_or_default()
30044    }
30045}
30046impl Default for PARAM_EXT_ACK_DATA {
30047    fn default() -> Self {
30048        Self::DEFAULT.clone()
30049    }
30050}
30051impl MessageData for PARAM_EXT_ACK_DATA {
30052    type Message = MavMessage;
30053    const ID: u32 = 324u32;
30054    const NAME: &'static str = "PARAM_EXT_ACK";
30055    const EXTRA_CRC: u8 = 132u8;
30056    const ENCODED_LEN: usize = 146usize;
30057    fn deser(
30058        _version: MavlinkVersion,
30059        __input: &[u8],
30060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30061        let avail_len = __input.len();
30062        let mut payload_buf = [0; Self::ENCODED_LEN];
30063        let mut buf = if avail_len < Self::ENCODED_LEN {
30064            payload_buf[0..avail_len].copy_from_slice(__input);
30065            Bytes::new(&payload_buf)
30066        } else {
30067            Bytes::new(__input)
30068        };
30069        let mut __struct = Self::default();
30070        for v in &mut __struct.param_id {
30071            let val = buf.get_u8();
30072            *v = val;
30073        }
30074        for v in &mut __struct.param_value {
30075            let val = buf.get_u8();
30076            *v = val;
30077        }
30078        let tmp = buf.get_u8();
30079        __struct.param_type =
30080            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30081                enum_type: "MavParamExtType",
30082                value: tmp as u32,
30083            })?;
30084        let tmp = buf.get_u8();
30085        __struct.param_result =
30086            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30087                enum_type: "ParamAck",
30088                value: tmp as u32,
30089            })?;
30090        Ok(__struct)
30091    }
30092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30093        let mut __tmp = BytesMut::new(bytes);
30094        #[allow(clippy::absurd_extreme_comparisons)]
30095        #[allow(unused_comparisons)]
30096        if __tmp.remaining() < Self::ENCODED_LEN {
30097            panic!(
30098                "buffer is too small (need {} bytes, but got {})",
30099                Self::ENCODED_LEN,
30100                __tmp.remaining(),
30101            )
30102        }
30103        for val in &self.param_id {
30104            __tmp.put_u8(*val);
30105        }
30106        for val in &self.param_value {
30107            __tmp.put_u8(*val);
30108        }
30109        __tmp.put_u8(self.param_type as u8);
30110        __tmp.put_u8(self.param_result as u8);
30111        if matches!(version, MavlinkVersion::V2) {
30112            let len = __tmp.len();
30113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30114        } else {
30115            __tmp.len()
30116        }
30117    }
30118}
30119#[doc = "id: 300"]
30120#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
30121#[derive(Debug, Clone, PartialEq)]
30122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30124pub struct PROTOCOL_VERSION_DATA {
30125    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
30126    pub version: u16,
30127    #[doc = "Minimum MAVLink version supported"]
30128    pub min_version: u16,
30129    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
30130    pub max_version: u16,
30131    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
30132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30133    pub spec_version_hash: [u8; 8],
30134    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
30135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30136    pub library_version_hash: [u8; 8],
30137}
30138impl PROTOCOL_VERSION_DATA {
30139    pub const ENCODED_LEN: usize = 22usize;
30140    pub const DEFAULT: Self = Self {
30141        version: 0_u16,
30142        min_version: 0_u16,
30143        max_version: 0_u16,
30144        spec_version_hash: [0_u8; 8usize],
30145        library_version_hash: [0_u8; 8usize],
30146    };
30147    #[cfg(feature = "arbitrary")]
30148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30149        use arbitrary::{Arbitrary, Unstructured};
30150        let mut buf = [0u8; 1024];
30151        rng.fill_bytes(&mut buf);
30152        let mut unstructured = Unstructured::new(&buf);
30153        Self::arbitrary(&mut unstructured).unwrap_or_default()
30154    }
30155}
30156impl Default for PROTOCOL_VERSION_DATA {
30157    fn default() -> Self {
30158        Self::DEFAULT.clone()
30159    }
30160}
30161impl MessageData for PROTOCOL_VERSION_DATA {
30162    type Message = MavMessage;
30163    const ID: u32 = 300u32;
30164    const NAME: &'static str = "PROTOCOL_VERSION";
30165    const EXTRA_CRC: u8 = 217u8;
30166    const ENCODED_LEN: usize = 22usize;
30167    fn deser(
30168        _version: MavlinkVersion,
30169        __input: &[u8],
30170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30171        let avail_len = __input.len();
30172        let mut payload_buf = [0; Self::ENCODED_LEN];
30173        let mut buf = if avail_len < Self::ENCODED_LEN {
30174            payload_buf[0..avail_len].copy_from_slice(__input);
30175            Bytes::new(&payload_buf)
30176        } else {
30177            Bytes::new(__input)
30178        };
30179        let mut __struct = Self::default();
30180        __struct.version = buf.get_u16_le();
30181        __struct.min_version = buf.get_u16_le();
30182        __struct.max_version = buf.get_u16_le();
30183        for v in &mut __struct.spec_version_hash {
30184            let val = buf.get_u8();
30185            *v = val;
30186        }
30187        for v in &mut __struct.library_version_hash {
30188            let val = buf.get_u8();
30189            *v = val;
30190        }
30191        Ok(__struct)
30192    }
30193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30194        let mut __tmp = BytesMut::new(bytes);
30195        #[allow(clippy::absurd_extreme_comparisons)]
30196        #[allow(unused_comparisons)]
30197        if __tmp.remaining() < Self::ENCODED_LEN {
30198            panic!(
30199                "buffer is too small (need {} bytes, but got {})",
30200                Self::ENCODED_LEN,
30201                __tmp.remaining(),
30202            )
30203        }
30204        __tmp.put_u16_le(self.version);
30205        __tmp.put_u16_le(self.min_version);
30206        __tmp.put_u16_le(self.max_version);
30207        for val in &self.spec_version_hash {
30208            __tmp.put_u8(*val);
30209        }
30210        for val in &self.library_version_hash {
30211            __tmp.put_u8(*val);
30212        }
30213        if matches!(version, MavlinkVersion::V2) {
30214            let len = __tmp.len();
30215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30216        } else {
30217            __tmp.len()
30218        }
30219    }
30220}
30221#[doc = "id: 23"]
30222#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
30223#[derive(Debug, Clone, PartialEq)]
30224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30225#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30226pub struct PARAM_SET_DATA {
30227    #[doc = "Onboard parameter value"]
30228    pub param_value: f32,
30229    #[doc = "System ID"]
30230    pub target_system: u8,
30231    #[doc = "Component ID"]
30232    pub target_component: u8,
30233    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
30234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30235    pub param_id: [u8; 16],
30236    #[doc = "Onboard parameter type."]
30237    pub param_type: MavParamType,
30238}
30239impl PARAM_SET_DATA {
30240    pub const ENCODED_LEN: usize = 23usize;
30241    pub const DEFAULT: Self = Self {
30242        param_value: 0.0_f32,
30243        target_system: 0_u8,
30244        target_component: 0_u8,
30245        param_id: [0_u8; 16usize],
30246        param_type: MavParamType::DEFAULT,
30247    };
30248    #[cfg(feature = "arbitrary")]
30249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30250        use arbitrary::{Arbitrary, Unstructured};
30251        let mut buf = [0u8; 1024];
30252        rng.fill_bytes(&mut buf);
30253        let mut unstructured = Unstructured::new(&buf);
30254        Self::arbitrary(&mut unstructured).unwrap_or_default()
30255    }
30256}
30257impl Default for PARAM_SET_DATA {
30258    fn default() -> Self {
30259        Self::DEFAULT.clone()
30260    }
30261}
30262impl MessageData for PARAM_SET_DATA {
30263    type Message = MavMessage;
30264    const ID: u32 = 23u32;
30265    const NAME: &'static str = "PARAM_SET";
30266    const EXTRA_CRC: u8 = 168u8;
30267    const ENCODED_LEN: usize = 23usize;
30268    fn deser(
30269        _version: MavlinkVersion,
30270        __input: &[u8],
30271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30272        let avail_len = __input.len();
30273        let mut payload_buf = [0; Self::ENCODED_LEN];
30274        let mut buf = if avail_len < Self::ENCODED_LEN {
30275            payload_buf[0..avail_len].copy_from_slice(__input);
30276            Bytes::new(&payload_buf)
30277        } else {
30278            Bytes::new(__input)
30279        };
30280        let mut __struct = Self::default();
30281        __struct.param_value = buf.get_f32_le();
30282        __struct.target_system = buf.get_u8();
30283        __struct.target_component = buf.get_u8();
30284        for v in &mut __struct.param_id {
30285            let val = buf.get_u8();
30286            *v = val;
30287        }
30288        let tmp = buf.get_u8();
30289        __struct.param_type =
30290            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30291                enum_type: "MavParamType",
30292                value: tmp as u32,
30293            })?;
30294        Ok(__struct)
30295    }
30296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30297        let mut __tmp = BytesMut::new(bytes);
30298        #[allow(clippy::absurd_extreme_comparisons)]
30299        #[allow(unused_comparisons)]
30300        if __tmp.remaining() < Self::ENCODED_LEN {
30301            panic!(
30302                "buffer is too small (need {} bytes, but got {})",
30303                Self::ENCODED_LEN,
30304                __tmp.remaining(),
30305            )
30306        }
30307        __tmp.put_f32_le(self.param_value);
30308        __tmp.put_u8(self.target_system);
30309        __tmp.put_u8(self.target_component);
30310        for val in &self.param_id {
30311            __tmp.put_u8(*val);
30312        }
30313        __tmp.put_u8(self.param_type as u8);
30314        if matches!(version, MavlinkVersion::V2) {
30315            let len = __tmp.len();
30316            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30317        } else {
30318            __tmp.len()
30319        }
30320    }
30321}
30322#[doc = "id: 331"]
30323#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
30324#[derive(Debug, Clone, PartialEq)]
30325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30327pub struct ODOMETRY_DATA {
30328    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30329    pub time_usec: u64,
30330    #[doc = "X Position"]
30331    pub x: f32,
30332    #[doc = "Y Position"]
30333    pub y: f32,
30334    #[doc = "Z Position"]
30335    pub z: f32,
30336    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
30337    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30338    pub q: [f32; 4],
30339    #[doc = "X linear speed"]
30340    pub vx: f32,
30341    #[doc = "Y linear speed"]
30342    pub vy: f32,
30343    #[doc = "Z linear speed"]
30344    pub vz: f32,
30345    #[doc = "Roll angular speed"]
30346    pub rollspeed: f32,
30347    #[doc = "Pitch angular speed"]
30348    pub pitchspeed: f32,
30349    #[doc = "Yaw angular speed"]
30350    pub yawspeed: f32,
30351    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30353    pub pose_covariance: [f32; 21],
30354    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30356    pub velocity_covariance: [f32; 21],
30357    #[doc = "Coordinate frame of reference for the pose data."]
30358    pub frame_id: MavFrame,
30359    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
30360    pub child_frame_id: MavFrame,
30361    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30363    pub reset_counter: u8,
30364    #[doc = "Type of estimator that is providing the odometry."]
30365    #[cfg_attr(feature = "serde", serde(default))]
30366    pub estimator_type: MavEstimatorType,
30367    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
30368    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30369    pub quality: i8,
30370}
30371impl ODOMETRY_DATA {
30372    pub const ENCODED_LEN: usize = 233usize;
30373    pub const DEFAULT: Self = Self {
30374        time_usec: 0_u64,
30375        x: 0.0_f32,
30376        y: 0.0_f32,
30377        z: 0.0_f32,
30378        q: [0.0_f32; 4usize],
30379        vx: 0.0_f32,
30380        vy: 0.0_f32,
30381        vz: 0.0_f32,
30382        rollspeed: 0.0_f32,
30383        pitchspeed: 0.0_f32,
30384        yawspeed: 0.0_f32,
30385        pose_covariance: [0.0_f32; 21usize],
30386        velocity_covariance: [0.0_f32; 21usize],
30387        frame_id: MavFrame::DEFAULT,
30388        child_frame_id: MavFrame::DEFAULT,
30389        reset_counter: 0_u8,
30390        estimator_type: MavEstimatorType::DEFAULT,
30391        quality: 0_i8,
30392    };
30393    #[cfg(feature = "arbitrary")]
30394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30395        use arbitrary::{Arbitrary, Unstructured};
30396        let mut buf = [0u8; 1024];
30397        rng.fill_bytes(&mut buf);
30398        let mut unstructured = Unstructured::new(&buf);
30399        Self::arbitrary(&mut unstructured).unwrap_or_default()
30400    }
30401}
30402impl Default for ODOMETRY_DATA {
30403    fn default() -> Self {
30404        Self::DEFAULT.clone()
30405    }
30406}
30407impl MessageData for ODOMETRY_DATA {
30408    type Message = MavMessage;
30409    const ID: u32 = 331u32;
30410    const NAME: &'static str = "ODOMETRY";
30411    const EXTRA_CRC: u8 = 91u8;
30412    const ENCODED_LEN: usize = 233usize;
30413    fn deser(
30414        _version: MavlinkVersion,
30415        __input: &[u8],
30416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30417        let avail_len = __input.len();
30418        let mut payload_buf = [0; Self::ENCODED_LEN];
30419        let mut buf = if avail_len < Self::ENCODED_LEN {
30420            payload_buf[0..avail_len].copy_from_slice(__input);
30421            Bytes::new(&payload_buf)
30422        } else {
30423            Bytes::new(__input)
30424        };
30425        let mut __struct = Self::default();
30426        __struct.time_usec = buf.get_u64_le();
30427        __struct.x = buf.get_f32_le();
30428        __struct.y = buf.get_f32_le();
30429        __struct.z = buf.get_f32_le();
30430        for v in &mut __struct.q {
30431            let val = buf.get_f32_le();
30432            *v = val;
30433        }
30434        __struct.vx = buf.get_f32_le();
30435        __struct.vy = buf.get_f32_le();
30436        __struct.vz = buf.get_f32_le();
30437        __struct.rollspeed = buf.get_f32_le();
30438        __struct.pitchspeed = buf.get_f32_le();
30439        __struct.yawspeed = buf.get_f32_le();
30440        for v in &mut __struct.pose_covariance {
30441            let val = buf.get_f32_le();
30442            *v = val;
30443        }
30444        for v in &mut __struct.velocity_covariance {
30445            let val = buf.get_f32_le();
30446            *v = val;
30447        }
30448        let tmp = buf.get_u8();
30449        __struct.frame_id =
30450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30451                enum_type: "MavFrame",
30452                value: tmp as u32,
30453            })?;
30454        let tmp = buf.get_u8();
30455        __struct.child_frame_id =
30456            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30457                enum_type: "MavFrame",
30458                value: tmp as u32,
30459            })?;
30460        __struct.reset_counter = buf.get_u8();
30461        let tmp = buf.get_u8();
30462        __struct.estimator_type =
30463            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30464                enum_type: "MavEstimatorType",
30465                value: tmp as u32,
30466            })?;
30467        __struct.quality = buf.get_i8();
30468        Ok(__struct)
30469    }
30470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30471        let mut __tmp = BytesMut::new(bytes);
30472        #[allow(clippy::absurd_extreme_comparisons)]
30473        #[allow(unused_comparisons)]
30474        if __tmp.remaining() < Self::ENCODED_LEN {
30475            panic!(
30476                "buffer is too small (need {} bytes, but got {})",
30477                Self::ENCODED_LEN,
30478                __tmp.remaining(),
30479            )
30480        }
30481        __tmp.put_u64_le(self.time_usec);
30482        __tmp.put_f32_le(self.x);
30483        __tmp.put_f32_le(self.y);
30484        __tmp.put_f32_le(self.z);
30485        for val in &self.q {
30486            __tmp.put_f32_le(*val);
30487        }
30488        __tmp.put_f32_le(self.vx);
30489        __tmp.put_f32_le(self.vy);
30490        __tmp.put_f32_le(self.vz);
30491        __tmp.put_f32_le(self.rollspeed);
30492        __tmp.put_f32_le(self.pitchspeed);
30493        __tmp.put_f32_le(self.yawspeed);
30494        for val in &self.pose_covariance {
30495            __tmp.put_f32_le(*val);
30496        }
30497        for val in &self.velocity_covariance {
30498            __tmp.put_f32_le(*val);
30499        }
30500        __tmp.put_u8(self.frame_id as u8);
30501        __tmp.put_u8(self.child_frame_id as u8);
30502        __tmp.put_u8(self.reset_counter);
30503        __tmp.put_u8(self.estimator_type as u8);
30504        __tmp.put_i8(self.quality);
30505        if matches!(version, MavlinkVersion::V2) {
30506            let len = __tmp.len();
30507            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30508        } else {
30509            __tmp.len()
30510        }
30511    }
30512}
30513#[doc = "id: 275"]
30514#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
30515#[derive(Debug, Clone, PartialEq)]
30516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30518pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
30519    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
30520    pub point_x: f32,
30521    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
30522    pub point_y: f32,
30523    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
30524    pub radius: f32,
30525    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
30526    pub rec_top_x: f32,
30527    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
30528    pub rec_top_y: f32,
30529    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
30530    pub rec_bottom_x: f32,
30531    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
30532    pub rec_bottom_y: f32,
30533    #[doc = "Current tracking status"]
30534    pub tracking_status: CameraTrackingStatusFlags,
30535    #[doc = "Current tracking mode"]
30536    pub tracking_mode: CameraTrackingMode,
30537    #[doc = "Defines location of target data"]
30538    pub target_data: CameraTrackingTargetData,
30539    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30540    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30541    pub camera_device_id: u8,
30542}
30543impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
30544    pub const ENCODED_LEN: usize = 32usize;
30545    pub const DEFAULT: Self = Self {
30546        point_x: 0.0_f32,
30547        point_y: 0.0_f32,
30548        radius: 0.0_f32,
30549        rec_top_x: 0.0_f32,
30550        rec_top_y: 0.0_f32,
30551        rec_bottom_x: 0.0_f32,
30552        rec_bottom_y: 0.0_f32,
30553        tracking_status: CameraTrackingStatusFlags::DEFAULT,
30554        tracking_mode: CameraTrackingMode::DEFAULT,
30555        target_data: CameraTrackingTargetData::DEFAULT,
30556        camera_device_id: 0_u8,
30557    };
30558    #[cfg(feature = "arbitrary")]
30559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30560        use arbitrary::{Arbitrary, Unstructured};
30561        let mut buf = [0u8; 1024];
30562        rng.fill_bytes(&mut buf);
30563        let mut unstructured = Unstructured::new(&buf);
30564        Self::arbitrary(&mut unstructured).unwrap_or_default()
30565    }
30566}
30567impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
30568    fn default() -> Self {
30569        Self::DEFAULT.clone()
30570    }
30571}
30572impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
30573    type Message = MavMessage;
30574    const ID: u32 = 275u32;
30575    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
30576    const EXTRA_CRC: u8 = 126u8;
30577    const ENCODED_LEN: usize = 32usize;
30578    fn deser(
30579        _version: MavlinkVersion,
30580        __input: &[u8],
30581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30582        let avail_len = __input.len();
30583        let mut payload_buf = [0; Self::ENCODED_LEN];
30584        let mut buf = if avail_len < Self::ENCODED_LEN {
30585            payload_buf[0..avail_len].copy_from_slice(__input);
30586            Bytes::new(&payload_buf)
30587        } else {
30588            Bytes::new(__input)
30589        };
30590        let mut __struct = Self::default();
30591        __struct.point_x = buf.get_f32_le();
30592        __struct.point_y = buf.get_f32_le();
30593        __struct.radius = buf.get_f32_le();
30594        __struct.rec_top_x = buf.get_f32_le();
30595        __struct.rec_top_y = buf.get_f32_le();
30596        __struct.rec_bottom_x = buf.get_f32_le();
30597        __struct.rec_bottom_y = buf.get_f32_le();
30598        let tmp = buf.get_u8();
30599        __struct.tracking_status =
30600            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30601                enum_type: "CameraTrackingStatusFlags",
30602                value: tmp as u32,
30603            })?;
30604        let tmp = buf.get_u8();
30605        __struct.tracking_mode =
30606            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30607                enum_type: "CameraTrackingMode",
30608                value: tmp as u32,
30609            })?;
30610        let tmp = buf.get_u8();
30611        __struct.target_data =
30612            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
30613                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30614                    flag_type: "CameraTrackingTargetData",
30615                    value: tmp as u32,
30616                })?;
30617        __struct.camera_device_id = buf.get_u8();
30618        Ok(__struct)
30619    }
30620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30621        let mut __tmp = BytesMut::new(bytes);
30622        #[allow(clippy::absurd_extreme_comparisons)]
30623        #[allow(unused_comparisons)]
30624        if __tmp.remaining() < Self::ENCODED_LEN {
30625            panic!(
30626                "buffer is too small (need {} bytes, but got {})",
30627                Self::ENCODED_LEN,
30628                __tmp.remaining(),
30629            )
30630        }
30631        __tmp.put_f32_le(self.point_x);
30632        __tmp.put_f32_le(self.point_y);
30633        __tmp.put_f32_le(self.radius);
30634        __tmp.put_f32_le(self.rec_top_x);
30635        __tmp.put_f32_le(self.rec_top_y);
30636        __tmp.put_f32_le(self.rec_bottom_x);
30637        __tmp.put_f32_le(self.rec_bottom_y);
30638        __tmp.put_u8(self.tracking_status as u8);
30639        __tmp.put_u8(self.tracking_mode as u8);
30640        __tmp.put_u8(self.target_data.bits());
30641        __tmp.put_u8(self.camera_device_id);
30642        if matches!(version, MavlinkVersion::V2) {
30643            let len = __tmp.len();
30644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30645        } else {
30646            __tmp.len()
30647        }
30648    }
30649}
30650#[doc = "id: 269"]
30651#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
30652#[derive(Debug, Clone, PartialEq)]
30653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30655pub struct VIDEO_STREAM_INFORMATION_DATA {
30656    #[doc = "Frame rate."]
30657    pub framerate: f32,
30658    #[doc = "Bit rate."]
30659    pub bitrate: u32,
30660    #[doc = "Bitmap of stream status flags."]
30661    pub flags: VideoStreamStatusFlags,
30662    #[doc = "Horizontal resolution."]
30663    pub resolution_h: u16,
30664    #[doc = "Vertical resolution."]
30665    pub resolution_v: u16,
30666    #[doc = "Video image rotation clockwise."]
30667    pub rotation: u16,
30668    #[doc = "Horizontal Field of view."]
30669    pub hfov: u16,
30670    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30671    pub stream_id: u8,
30672    #[doc = "Number of streams available."]
30673    pub count: u8,
30674    #[doc = "Type of stream."]
30675    pub mavtype: VideoStreamType,
30676    #[doc = "Stream name."]
30677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30678    pub name: [u8; 32],
30679    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
30680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30681    pub uri: [u8; 160],
30682    #[doc = "Encoding of stream."]
30683    #[cfg_attr(feature = "serde", serde(default))]
30684    pub encoding: VideoStreamEncoding,
30685    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30686    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30687    pub camera_device_id: u8,
30688}
30689impl VIDEO_STREAM_INFORMATION_DATA {
30690    pub const ENCODED_LEN: usize = 215usize;
30691    pub const DEFAULT: Self = Self {
30692        framerate: 0.0_f32,
30693        bitrate: 0_u32,
30694        flags: VideoStreamStatusFlags::DEFAULT,
30695        resolution_h: 0_u16,
30696        resolution_v: 0_u16,
30697        rotation: 0_u16,
30698        hfov: 0_u16,
30699        stream_id: 0_u8,
30700        count: 0_u8,
30701        mavtype: VideoStreamType::DEFAULT,
30702        name: [0_u8; 32usize],
30703        uri: [0_u8; 160usize],
30704        encoding: VideoStreamEncoding::DEFAULT,
30705        camera_device_id: 0_u8,
30706    };
30707    #[cfg(feature = "arbitrary")]
30708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30709        use arbitrary::{Arbitrary, Unstructured};
30710        let mut buf = [0u8; 1024];
30711        rng.fill_bytes(&mut buf);
30712        let mut unstructured = Unstructured::new(&buf);
30713        Self::arbitrary(&mut unstructured).unwrap_or_default()
30714    }
30715}
30716impl Default for VIDEO_STREAM_INFORMATION_DATA {
30717    fn default() -> Self {
30718        Self::DEFAULT.clone()
30719    }
30720}
30721impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
30722    type Message = MavMessage;
30723    const ID: u32 = 269u32;
30724    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
30725    const EXTRA_CRC: u8 = 109u8;
30726    const ENCODED_LEN: usize = 215usize;
30727    fn deser(
30728        _version: MavlinkVersion,
30729        __input: &[u8],
30730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30731        let avail_len = __input.len();
30732        let mut payload_buf = [0; Self::ENCODED_LEN];
30733        let mut buf = if avail_len < Self::ENCODED_LEN {
30734            payload_buf[0..avail_len].copy_from_slice(__input);
30735            Bytes::new(&payload_buf)
30736        } else {
30737            Bytes::new(__input)
30738        };
30739        let mut __struct = Self::default();
30740        __struct.framerate = buf.get_f32_le();
30741        __struct.bitrate = buf.get_u32_le();
30742        let tmp = buf.get_u16_le();
30743        __struct.flags = VideoStreamStatusFlags::from_bits(
30744            tmp & VideoStreamStatusFlags::all().bits(),
30745        )
30746        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30747            flag_type: "VideoStreamStatusFlags",
30748            value: tmp as u32,
30749        })?;
30750        __struct.resolution_h = buf.get_u16_le();
30751        __struct.resolution_v = buf.get_u16_le();
30752        __struct.rotation = buf.get_u16_le();
30753        __struct.hfov = buf.get_u16_le();
30754        __struct.stream_id = buf.get_u8();
30755        __struct.count = buf.get_u8();
30756        let tmp = buf.get_u8();
30757        __struct.mavtype =
30758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30759                enum_type: "VideoStreamType",
30760                value: tmp as u32,
30761            })?;
30762        for v in &mut __struct.name {
30763            let val = buf.get_u8();
30764            *v = val;
30765        }
30766        for v in &mut __struct.uri {
30767            let val = buf.get_u8();
30768            *v = val;
30769        }
30770        let tmp = buf.get_u8();
30771        __struct.encoding =
30772            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30773                enum_type: "VideoStreamEncoding",
30774                value: tmp as u32,
30775            })?;
30776        __struct.camera_device_id = buf.get_u8();
30777        Ok(__struct)
30778    }
30779    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30780        let mut __tmp = BytesMut::new(bytes);
30781        #[allow(clippy::absurd_extreme_comparisons)]
30782        #[allow(unused_comparisons)]
30783        if __tmp.remaining() < Self::ENCODED_LEN {
30784            panic!(
30785                "buffer is too small (need {} bytes, but got {})",
30786                Self::ENCODED_LEN,
30787                __tmp.remaining(),
30788            )
30789        }
30790        __tmp.put_f32_le(self.framerate);
30791        __tmp.put_u32_le(self.bitrate);
30792        __tmp.put_u16_le(self.flags.bits());
30793        __tmp.put_u16_le(self.resolution_h);
30794        __tmp.put_u16_le(self.resolution_v);
30795        __tmp.put_u16_le(self.rotation);
30796        __tmp.put_u16_le(self.hfov);
30797        __tmp.put_u8(self.stream_id);
30798        __tmp.put_u8(self.count);
30799        __tmp.put_u8(self.mavtype as u8);
30800        for val in &self.name {
30801            __tmp.put_u8(*val);
30802        }
30803        for val in &self.uri {
30804            __tmp.put_u8(*val);
30805        }
30806        __tmp.put_u8(self.encoding as u8);
30807        __tmp.put_u8(self.camera_device_id);
30808        if matches!(version, MavlinkVersion::V2) {
30809            let len = __tmp.len();
30810            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30811        } else {
30812            __tmp.len()
30813        }
30814    }
30815}
30816#[doc = "id: 120"]
30817#[doc = "Reply to LOG_REQUEST_DATA."]
30818#[derive(Debug, Clone, PartialEq)]
30819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30821pub struct LOG_DATA_DATA {
30822    #[doc = "Offset into the log"]
30823    pub ofs: u32,
30824    #[doc = "Log id (from LOG_ENTRY reply)"]
30825    pub id: u16,
30826    #[doc = "Number of bytes (zero for end of log)"]
30827    pub count: u8,
30828    #[doc = "log data"]
30829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30830    pub data: [u8; 90],
30831}
30832impl LOG_DATA_DATA {
30833    pub const ENCODED_LEN: usize = 97usize;
30834    pub const DEFAULT: Self = Self {
30835        ofs: 0_u32,
30836        id: 0_u16,
30837        count: 0_u8,
30838        data: [0_u8; 90usize],
30839    };
30840    #[cfg(feature = "arbitrary")]
30841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30842        use arbitrary::{Arbitrary, Unstructured};
30843        let mut buf = [0u8; 1024];
30844        rng.fill_bytes(&mut buf);
30845        let mut unstructured = Unstructured::new(&buf);
30846        Self::arbitrary(&mut unstructured).unwrap_or_default()
30847    }
30848}
30849impl Default for LOG_DATA_DATA {
30850    fn default() -> Self {
30851        Self::DEFAULT.clone()
30852    }
30853}
30854impl MessageData for LOG_DATA_DATA {
30855    type Message = MavMessage;
30856    const ID: u32 = 120u32;
30857    const NAME: &'static str = "LOG_DATA";
30858    const EXTRA_CRC: u8 = 134u8;
30859    const ENCODED_LEN: usize = 97usize;
30860    fn deser(
30861        _version: MavlinkVersion,
30862        __input: &[u8],
30863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30864        let avail_len = __input.len();
30865        let mut payload_buf = [0; Self::ENCODED_LEN];
30866        let mut buf = if avail_len < Self::ENCODED_LEN {
30867            payload_buf[0..avail_len].copy_from_slice(__input);
30868            Bytes::new(&payload_buf)
30869        } else {
30870            Bytes::new(__input)
30871        };
30872        let mut __struct = Self::default();
30873        __struct.ofs = buf.get_u32_le();
30874        __struct.id = buf.get_u16_le();
30875        __struct.count = buf.get_u8();
30876        for v in &mut __struct.data {
30877            let val = buf.get_u8();
30878            *v = val;
30879        }
30880        Ok(__struct)
30881    }
30882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30883        let mut __tmp = BytesMut::new(bytes);
30884        #[allow(clippy::absurd_extreme_comparisons)]
30885        #[allow(unused_comparisons)]
30886        if __tmp.remaining() < Self::ENCODED_LEN {
30887            panic!(
30888                "buffer is too small (need {} bytes, but got {})",
30889                Self::ENCODED_LEN,
30890                __tmp.remaining(),
30891            )
30892        }
30893        __tmp.put_u32_le(self.ofs);
30894        __tmp.put_u16_le(self.id);
30895        __tmp.put_u8(self.count);
30896        for val in &self.data {
30897            __tmp.put_u8(*val);
30898        }
30899        if matches!(version, MavlinkVersion::V2) {
30900            let len = __tmp.len();
30901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30902        } else {
30903            __tmp.len()
30904        }
30905    }
30906}
30907#[doc = "id: 250"]
30908#[doc = "To debug something using a named 3D vector."]
30909#[derive(Debug, Clone, PartialEq)]
30910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30912pub struct DEBUG_VECT_DATA {
30913    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30914    pub time_usec: u64,
30915    #[doc = "x"]
30916    pub x: f32,
30917    #[doc = "y"]
30918    pub y: f32,
30919    #[doc = "z"]
30920    pub z: f32,
30921    #[doc = "Name"]
30922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30923    pub name: [u8; 10],
30924}
30925impl DEBUG_VECT_DATA {
30926    pub const ENCODED_LEN: usize = 30usize;
30927    pub const DEFAULT: Self = Self {
30928        time_usec: 0_u64,
30929        x: 0.0_f32,
30930        y: 0.0_f32,
30931        z: 0.0_f32,
30932        name: [0_u8; 10usize],
30933    };
30934    #[cfg(feature = "arbitrary")]
30935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30936        use arbitrary::{Arbitrary, Unstructured};
30937        let mut buf = [0u8; 1024];
30938        rng.fill_bytes(&mut buf);
30939        let mut unstructured = Unstructured::new(&buf);
30940        Self::arbitrary(&mut unstructured).unwrap_or_default()
30941    }
30942}
30943impl Default for DEBUG_VECT_DATA {
30944    fn default() -> Self {
30945        Self::DEFAULT.clone()
30946    }
30947}
30948impl MessageData for DEBUG_VECT_DATA {
30949    type Message = MavMessage;
30950    const ID: u32 = 250u32;
30951    const NAME: &'static str = "DEBUG_VECT";
30952    const EXTRA_CRC: u8 = 49u8;
30953    const ENCODED_LEN: usize = 30usize;
30954    fn deser(
30955        _version: MavlinkVersion,
30956        __input: &[u8],
30957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30958        let avail_len = __input.len();
30959        let mut payload_buf = [0; Self::ENCODED_LEN];
30960        let mut buf = if avail_len < Self::ENCODED_LEN {
30961            payload_buf[0..avail_len].copy_from_slice(__input);
30962            Bytes::new(&payload_buf)
30963        } else {
30964            Bytes::new(__input)
30965        };
30966        let mut __struct = Self::default();
30967        __struct.time_usec = buf.get_u64_le();
30968        __struct.x = buf.get_f32_le();
30969        __struct.y = buf.get_f32_le();
30970        __struct.z = buf.get_f32_le();
30971        for v in &mut __struct.name {
30972            let val = buf.get_u8();
30973            *v = val;
30974        }
30975        Ok(__struct)
30976    }
30977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30978        let mut __tmp = BytesMut::new(bytes);
30979        #[allow(clippy::absurd_extreme_comparisons)]
30980        #[allow(unused_comparisons)]
30981        if __tmp.remaining() < Self::ENCODED_LEN {
30982            panic!(
30983                "buffer is too small (need {} bytes, but got {})",
30984                Self::ENCODED_LEN,
30985                __tmp.remaining(),
30986            )
30987        }
30988        __tmp.put_u64_le(self.time_usec);
30989        __tmp.put_f32_le(self.x);
30990        __tmp.put_f32_le(self.y);
30991        __tmp.put_f32_le(self.z);
30992        for val in &self.name {
30993            __tmp.put_u8(*val);
30994        }
30995        if matches!(version, MavlinkVersion::V2) {
30996            let len = __tmp.len();
30997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30998        } else {
30999            __tmp.len()
31000        }
31001    }
31002}
31003#[doc = "id: 84"]
31004#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
31005#[derive(Debug, Clone, PartialEq)]
31006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31008pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
31009    #[doc = "Timestamp (time since system boot)."]
31010    pub time_boot_ms: u32,
31011    #[doc = "X Position in NED frame"]
31012    pub x: f32,
31013    #[doc = "Y Position in NED frame"]
31014    pub y: f32,
31015    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
31016    pub z: f32,
31017    #[doc = "X velocity in NED frame"]
31018    pub vx: f32,
31019    #[doc = "Y velocity in NED frame"]
31020    pub vy: f32,
31021    #[doc = "Z velocity in NED frame"]
31022    pub vz: f32,
31023    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31024    pub afx: f32,
31025    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31026    pub afy: f32,
31027    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
31028    pub afz: f32,
31029    #[doc = "yaw setpoint"]
31030    pub yaw: f32,
31031    #[doc = "yaw rate setpoint"]
31032    pub yaw_rate: f32,
31033    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
31034    pub type_mask: PositionTargetTypemask,
31035    #[doc = "System ID"]
31036    pub target_system: u8,
31037    #[doc = "Component ID"]
31038    pub target_component: u8,
31039    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
31040    pub coordinate_frame: MavFrame,
31041}
31042impl SET_POSITION_TARGET_LOCAL_NED_DATA {
31043    pub const ENCODED_LEN: usize = 53usize;
31044    pub const DEFAULT: Self = Self {
31045        time_boot_ms: 0_u32,
31046        x: 0.0_f32,
31047        y: 0.0_f32,
31048        z: 0.0_f32,
31049        vx: 0.0_f32,
31050        vy: 0.0_f32,
31051        vz: 0.0_f32,
31052        afx: 0.0_f32,
31053        afy: 0.0_f32,
31054        afz: 0.0_f32,
31055        yaw: 0.0_f32,
31056        yaw_rate: 0.0_f32,
31057        type_mask: PositionTargetTypemask::DEFAULT,
31058        target_system: 0_u8,
31059        target_component: 0_u8,
31060        coordinate_frame: MavFrame::DEFAULT,
31061    };
31062    #[cfg(feature = "arbitrary")]
31063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31064        use arbitrary::{Arbitrary, Unstructured};
31065        let mut buf = [0u8; 1024];
31066        rng.fill_bytes(&mut buf);
31067        let mut unstructured = Unstructured::new(&buf);
31068        Self::arbitrary(&mut unstructured).unwrap_or_default()
31069    }
31070}
31071impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
31072    fn default() -> Self {
31073        Self::DEFAULT.clone()
31074    }
31075}
31076impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
31077    type Message = MavMessage;
31078    const ID: u32 = 84u32;
31079    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
31080    const EXTRA_CRC: u8 = 143u8;
31081    const ENCODED_LEN: usize = 53usize;
31082    fn deser(
31083        _version: MavlinkVersion,
31084        __input: &[u8],
31085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31086        let avail_len = __input.len();
31087        let mut payload_buf = [0; Self::ENCODED_LEN];
31088        let mut buf = if avail_len < Self::ENCODED_LEN {
31089            payload_buf[0..avail_len].copy_from_slice(__input);
31090            Bytes::new(&payload_buf)
31091        } else {
31092            Bytes::new(__input)
31093        };
31094        let mut __struct = Self::default();
31095        __struct.time_boot_ms = buf.get_u32_le();
31096        __struct.x = buf.get_f32_le();
31097        __struct.y = buf.get_f32_le();
31098        __struct.z = buf.get_f32_le();
31099        __struct.vx = buf.get_f32_le();
31100        __struct.vy = buf.get_f32_le();
31101        __struct.vz = buf.get_f32_le();
31102        __struct.afx = buf.get_f32_le();
31103        __struct.afy = buf.get_f32_le();
31104        __struct.afz = buf.get_f32_le();
31105        __struct.yaw = buf.get_f32_le();
31106        __struct.yaw_rate = buf.get_f32_le();
31107        let tmp = buf.get_u16_le();
31108        __struct.type_mask = PositionTargetTypemask::from_bits(
31109            tmp & PositionTargetTypemask::all().bits(),
31110        )
31111        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31112            flag_type: "PositionTargetTypemask",
31113            value: tmp as u32,
31114        })?;
31115        __struct.target_system = buf.get_u8();
31116        __struct.target_component = buf.get_u8();
31117        let tmp = buf.get_u8();
31118        __struct.coordinate_frame =
31119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31120                enum_type: "MavFrame",
31121                value: tmp as u32,
31122            })?;
31123        Ok(__struct)
31124    }
31125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31126        let mut __tmp = BytesMut::new(bytes);
31127        #[allow(clippy::absurd_extreme_comparisons)]
31128        #[allow(unused_comparisons)]
31129        if __tmp.remaining() < Self::ENCODED_LEN {
31130            panic!(
31131                "buffer is too small (need {} bytes, but got {})",
31132                Self::ENCODED_LEN,
31133                __tmp.remaining(),
31134            )
31135        }
31136        __tmp.put_u32_le(self.time_boot_ms);
31137        __tmp.put_f32_le(self.x);
31138        __tmp.put_f32_le(self.y);
31139        __tmp.put_f32_le(self.z);
31140        __tmp.put_f32_le(self.vx);
31141        __tmp.put_f32_le(self.vy);
31142        __tmp.put_f32_le(self.vz);
31143        __tmp.put_f32_le(self.afx);
31144        __tmp.put_f32_le(self.afy);
31145        __tmp.put_f32_le(self.afz);
31146        __tmp.put_f32_le(self.yaw);
31147        __tmp.put_f32_le(self.yaw_rate);
31148        __tmp.put_u16_le(self.type_mask.bits());
31149        __tmp.put_u8(self.target_system);
31150        __tmp.put_u8(self.target_component);
31151        __tmp.put_u8(self.coordinate_frame as u8);
31152        if matches!(version, MavlinkVersion::V2) {
31153            let len = __tmp.len();
31154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31155        } else {
31156            __tmp.len()
31157        }
31158    }
31159}
31160#[doc = "id: 128"]
31161#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
31162#[derive(Debug, Clone, PartialEq)]
31163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31165pub struct GPS2_RTK_DATA {
31166    #[doc = "Time since boot of last baseline message received."]
31167    pub time_last_baseline_ms: u32,
31168    #[doc = "GPS Time of Week of last baseline"]
31169    pub tow: u32,
31170    #[doc = "Current baseline in ECEF x or NED north component."]
31171    pub baseline_a_mm: i32,
31172    #[doc = "Current baseline in ECEF y or NED east component."]
31173    pub baseline_b_mm: i32,
31174    #[doc = "Current baseline in ECEF z or NED down component."]
31175    pub baseline_c_mm: i32,
31176    #[doc = "Current estimate of baseline accuracy."]
31177    pub accuracy: u32,
31178    #[doc = "Current number of integer ambiguity hypotheses."]
31179    pub iar_num_hypotheses: i32,
31180    #[doc = "GPS Week Number of last baseline"]
31181    pub wn: u16,
31182    #[doc = "Identification of connected RTK receiver."]
31183    pub rtk_receiver_id: u8,
31184    #[doc = "GPS-specific health report for RTK data."]
31185    pub rtk_health: u8,
31186    #[doc = "Rate of baseline messages being received by GPS"]
31187    pub rtk_rate: u8,
31188    #[doc = "Current number of sats used for RTK calculation."]
31189    pub nsats: u8,
31190    #[doc = "Coordinate system of baseline"]
31191    pub baseline_coords_type: RtkBaselineCoordinateSystem,
31192}
31193impl GPS2_RTK_DATA {
31194    pub const ENCODED_LEN: usize = 35usize;
31195    pub const DEFAULT: Self = Self {
31196        time_last_baseline_ms: 0_u32,
31197        tow: 0_u32,
31198        baseline_a_mm: 0_i32,
31199        baseline_b_mm: 0_i32,
31200        baseline_c_mm: 0_i32,
31201        accuracy: 0_u32,
31202        iar_num_hypotheses: 0_i32,
31203        wn: 0_u16,
31204        rtk_receiver_id: 0_u8,
31205        rtk_health: 0_u8,
31206        rtk_rate: 0_u8,
31207        nsats: 0_u8,
31208        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
31209    };
31210    #[cfg(feature = "arbitrary")]
31211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31212        use arbitrary::{Arbitrary, Unstructured};
31213        let mut buf = [0u8; 1024];
31214        rng.fill_bytes(&mut buf);
31215        let mut unstructured = Unstructured::new(&buf);
31216        Self::arbitrary(&mut unstructured).unwrap_or_default()
31217    }
31218}
31219impl Default for GPS2_RTK_DATA {
31220    fn default() -> Self {
31221        Self::DEFAULT.clone()
31222    }
31223}
31224impl MessageData for GPS2_RTK_DATA {
31225    type Message = MavMessage;
31226    const ID: u32 = 128u32;
31227    const NAME: &'static str = "GPS2_RTK";
31228    const EXTRA_CRC: u8 = 226u8;
31229    const ENCODED_LEN: usize = 35usize;
31230    fn deser(
31231        _version: MavlinkVersion,
31232        __input: &[u8],
31233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31234        let avail_len = __input.len();
31235        let mut payload_buf = [0; Self::ENCODED_LEN];
31236        let mut buf = if avail_len < Self::ENCODED_LEN {
31237            payload_buf[0..avail_len].copy_from_slice(__input);
31238            Bytes::new(&payload_buf)
31239        } else {
31240            Bytes::new(__input)
31241        };
31242        let mut __struct = Self::default();
31243        __struct.time_last_baseline_ms = buf.get_u32_le();
31244        __struct.tow = buf.get_u32_le();
31245        __struct.baseline_a_mm = buf.get_i32_le();
31246        __struct.baseline_b_mm = buf.get_i32_le();
31247        __struct.baseline_c_mm = buf.get_i32_le();
31248        __struct.accuracy = buf.get_u32_le();
31249        __struct.iar_num_hypotheses = buf.get_i32_le();
31250        __struct.wn = buf.get_u16_le();
31251        __struct.rtk_receiver_id = buf.get_u8();
31252        __struct.rtk_health = buf.get_u8();
31253        __struct.rtk_rate = buf.get_u8();
31254        __struct.nsats = buf.get_u8();
31255        let tmp = buf.get_u8();
31256        __struct.baseline_coords_type =
31257            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31258                enum_type: "RtkBaselineCoordinateSystem",
31259                value: tmp as u32,
31260            })?;
31261        Ok(__struct)
31262    }
31263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31264        let mut __tmp = BytesMut::new(bytes);
31265        #[allow(clippy::absurd_extreme_comparisons)]
31266        #[allow(unused_comparisons)]
31267        if __tmp.remaining() < Self::ENCODED_LEN {
31268            panic!(
31269                "buffer is too small (need {} bytes, but got {})",
31270                Self::ENCODED_LEN,
31271                __tmp.remaining(),
31272            )
31273        }
31274        __tmp.put_u32_le(self.time_last_baseline_ms);
31275        __tmp.put_u32_le(self.tow);
31276        __tmp.put_i32_le(self.baseline_a_mm);
31277        __tmp.put_i32_le(self.baseline_b_mm);
31278        __tmp.put_i32_le(self.baseline_c_mm);
31279        __tmp.put_u32_le(self.accuracy);
31280        __tmp.put_i32_le(self.iar_num_hypotheses);
31281        __tmp.put_u16_le(self.wn);
31282        __tmp.put_u8(self.rtk_receiver_id);
31283        __tmp.put_u8(self.rtk_health);
31284        __tmp.put_u8(self.rtk_rate);
31285        __tmp.put_u8(self.nsats);
31286        __tmp.put_u8(self.baseline_coords_type as u8);
31287        if matches!(version, MavlinkVersion::V2) {
31288            let len = __tmp.len();
31289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31290        } else {
31291            __tmp.len()
31292        }
31293    }
31294}
31295#[derive(Clone, PartialEq, Debug)]
31296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31297#[cfg_attr(feature = "serde", serde(tag = "type"))]
31298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31299#[repr(u32)]
31300pub enum MavMessage {
31301    COMMAND_ACK(COMMAND_ACK_DATA),
31302    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31303    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31304    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
31305    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
31306    SCALED_IMU(SCALED_IMU_DATA),
31307    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31308    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31309    VFR_HUD(VFR_HUD_DATA),
31310    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31311    HOME_POSITION(HOME_POSITION_DATA),
31312    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31313    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31314    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
31315    ATTITUDE(ATTITUDE_DATA),
31316    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
31317    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31318    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
31319    HIGH_LATENCY(HIGH_LATENCY_DATA),
31320    PLAY_TUNE(PLAY_TUNE_DATA),
31321    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
31322    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31323    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31324    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
31325    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
31326    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
31327    WINCH_STATUS(WINCH_STATUS_DATA),
31328    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
31329    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
31330    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
31331    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31332    AIS_VESSEL(AIS_VESSEL_DATA),
31333    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31334    EFI_STATUS(EFI_STATUS_DATA),
31335    MEMORY_VECT(MEMORY_VECT_DATA),
31336    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
31337    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31338    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
31339    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
31340    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
31341    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
31342    VIBRATION(VIBRATION_DATA),
31343    PARAM_VALUE(PARAM_VALUE_DATA),
31344    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31345    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
31346    V2_EXTENSION(V2_EXTENSION_DATA),
31347    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
31348    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31349    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
31350    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31351    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31352    CANFD_FRAME(CANFD_FRAME_DATA),
31353    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
31354    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
31355    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
31356    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
31357    CAN_FRAME(CAN_FRAME_DATA),
31358    GPS_RTK(GPS_RTK_DATA),
31359    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
31360    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31361    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31362    SYS_STATUS(SYS_STATUS_DATA),
31363    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31364    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
31365    SCALED_IMU2(SCALED_IMU2_DATA),
31366    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
31367    SIM_STATE(SIM_STATE_DATA),
31368    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
31369    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
31370    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31371    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31372    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
31373    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
31374    HIL_CONTROLS(HIL_CONTROLS_DATA),
31375    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31376    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
31377    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31378    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31379    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31380    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31381    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
31382    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
31383    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
31384    TERRAIN_DATA(TERRAIN_DATA_DATA),
31385    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31386    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31387    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
31388    GPS_STATUS(GPS_STATUS_DATA),
31389    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
31390    POWER_STATUS(POWER_STATUS_DATA),
31391    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
31392    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
31393    MISSION_REQUEST(MISSION_REQUEST_DATA),
31394    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
31395    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31396    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
31397    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31398    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
31399    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31400    HIL_STATE(HIL_STATE_DATA),
31401    RAW_PRESSURE(RAW_PRESSURE_DATA),
31402    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
31403    RADIO_STATUS(RADIO_STATUS_DATA),
31404    MISSION_ACK(MISSION_ACK_DATA),
31405    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
31406    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
31407    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
31408    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
31409    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31410    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
31411    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31412    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31413    FUEL_STATUS(FUEL_STATUS_DATA),
31414    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
31415    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
31416    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
31417    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
31418    ESC_STATUS(ESC_STATUS_DATA),
31419    CURRENT_MODE(CURRENT_MODE_DATA),
31420    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
31421    AUTH_KEY(AUTH_KEY_DATA),
31422    LOGGING_DATA(LOGGING_DATA_DATA),
31423    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
31424    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31425    ESC_INFO(ESC_INFO_DATA),
31426    RAW_RPM(RAW_RPM_DATA),
31427    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31428    TUNNEL(TUNNEL_DATA),
31429    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
31430    COLLISION(COLLISION_DATA),
31431    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
31432    EVENT(EVENT_DATA),
31433    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
31434    LOG_ERASE(LOG_ERASE_DATA),
31435    SETUP_SIGNING(SETUP_SIGNING_DATA),
31436    DEBUG(DEBUG_DATA),
31437    SET_MODE(SET_MODE_DATA),
31438    HEARTBEAT(HEARTBEAT_DATA),
31439    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31440    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
31441    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31442    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
31443    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
31444    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31445    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
31446    PING(PING_DATA),
31447    WIND_COV(WIND_COV_DATA),
31448    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31449    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
31450    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
31451    TIMESYNC(TIMESYNC_DATA),
31452    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
31453    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
31454    MISSION_ITEM(MISSION_ITEM_DATA),
31455    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
31456    GPS_INPUT(GPS_INPUT_DATA),
31457    GPS_RAW_INT(GPS_RAW_INT_DATA),
31458    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
31459    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
31460    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31461    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
31462    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31463    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
31464    MISSION_CURRENT(MISSION_CURRENT_DATA),
31465    REQUEST_EVENT(REQUEST_EVENT_DATA),
31466    LANDING_TARGET(LANDING_TARGET_DATA),
31467    GPS2_RAW(GPS2_RAW_DATA),
31468    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
31469    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
31470    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31471    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31472    RADIO_CALIBRATION(RADIO_CALIBRATION_DATA),
31473    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
31474    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
31475    BATTERY_STATUS(BATTERY_STATUS_DATA),
31476    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
31477    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
31478    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31479    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
31480    FENCE_STATUS(FENCE_STATUS_DATA),
31481    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
31482    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
31483    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31484    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
31485    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
31486    ALTITUDE(ALTITUDE_DATA),
31487    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31488    LOG_ENTRY(LOG_ENTRY_DATA),
31489    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
31490    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
31491    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
31492    DATA_STREAM(DATA_STREAM_DATA),
31493    MISSION_COUNT(MISSION_COUNT_DATA),
31494    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31495    STATUSTEXT(STATUSTEXT_DATA),
31496    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31497    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
31498    COMMAND_INT(COMMAND_INT_DATA),
31499    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
31500    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
31501    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31502    HIL_SENSOR(HIL_SENSOR_DATA),
31503    LOGGING_ACK(LOGGING_ACK_DATA),
31504    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31505    BATTERY_INFO(BATTERY_INFO_DATA),
31506    NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA),
31507    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
31508    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31509    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
31510    RAW_IMU(RAW_IMU_DATA),
31511    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
31512    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31513    SYSTEM_TIME(SYSTEM_TIME_DATA),
31514    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
31515    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
31516    SCALED_IMU3(SCALED_IMU3_DATA),
31517    COMMAND_LONG(COMMAND_LONG_DATA),
31518    HIL_GPS(HIL_GPS_DATA),
31519    UALBERTA_SYS_STATUS(UALBERTA_SYS_STATUS_DATA),
31520    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31521    HIGHRES_IMU(HIGHRES_IMU_DATA),
31522    RC_CHANNELS(RC_CHANNELS_DATA),
31523    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
31524    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
31525    PARAM_SET(PARAM_SET_DATA),
31526    ODOMETRY(ODOMETRY_DATA),
31527    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31528    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
31529    LOG_DATA(LOG_DATA_DATA),
31530    DEBUG_VECT(DEBUG_VECT_DATA),
31531    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
31532    GPS2_RTK(GPS2_RTK_DATA),
31533}
31534impl MavMessage {
31535    pub const fn all_ids() -> &'static [u32] {
31536        &[
31537            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
31538            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
31539            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
31540            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
31541            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
31542            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
31543            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
31544            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
31545            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
31546            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
31547            148u32, 149u32, 162u32, 192u32, 220u32, 221u32, 222u32, 225u32, 230u32, 231u32, 232u32,
31548            233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32,
31549            249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32,
31550            261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32,
31551            275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32,
31552            288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32,
31553            323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32,
31554            350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32,
31555            388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32,
31556            435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32,
31557            12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
31558        ]
31559    }
31560}
31561impl Message for MavMessage {
31562    fn parse(
31563        version: MavlinkVersion,
31564        id: u32,
31565        payload: &[u8],
31566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31567        match id {
31568            COMMAND_ACK_DATA::ID => {
31569                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
31570            }
31571            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
31572                .map(Self::LOCAL_POSITION_NED_COV),
31573            MISSION_ITEM_INT_DATA::ID => {
31574                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
31575            }
31576            OPTICAL_FLOW_RAD_DATA::ID => {
31577                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
31578            }
31579            ADSB_VEHICLE_DATA::ID => {
31580                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
31581            }
31582            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
31583            GPS_GLOBAL_ORIGIN_DATA::ID => {
31584                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
31585            }
31586            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
31587                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
31588                    .map(Self::GIMBAL_MANAGER_INFORMATION)
31589            }
31590            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
31591            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
31592                .map(Self::ACTUATOR_OUTPUT_STATUS),
31593            HOME_POSITION_DATA::ID => {
31594                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
31595            }
31596            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
31597                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
31598                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
31599            }
31600            AVAILABLE_MODES_DATA::ID => {
31601                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
31602            }
31603            GPS_INJECT_DATA_DATA::ID => {
31604                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
31605            }
31606            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
31607            SET_HOME_POSITION_DATA::ID => {
31608                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
31609            }
31610            GENERATOR_STATUS_DATA::ID => {
31611                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
31612            }
31613            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
31614                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
31615                    .map(Self::GIMBAL_DEVICE_INFORMATION)
31616            }
31617            HIGH_LATENCY_DATA::ID => {
31618                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
31619            }
31620            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
31621            SCALED_PRESSURE2_DATA::ID => {
31622                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
31623            }
31624            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
31625                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
31626                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
31627            }
31628            HIL_OPTICAL_FLOW_DATA::ID => {
31629                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
31630            }
31631            SET_ATTITUDE_TARGET_DATA::ID => {
31632                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
31633            }
31634            ONBOARD_COMPUTER_STATUS_DATA::ID => {
31635                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
31636                    .map(Self::ONBOARD_COMPUTER_STATUS)
31637            }
31638            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
31639                .map(Self::PARAM_EXT_REQUEST_LIST),
31640            WINCH_STATUS_DATA::ID => {
31641                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
31642            }
31643            RC_CHANNELS_SCALED_DATA::ID => {
31644                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
31645            }
31646            ATTITUDE_QUATERNION_COV_DATA::ID => {
31647                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
31648                    .map(Self::ATTITUDE_QUATERNION_COV)
31649            }
31650            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
31651                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
31652            }
31653            COMPONENT_INFORMATION_DATA::ID => {
31654                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
31655            }
31656            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
31657            FOLLOW_TARGET_DATA::ID => {
31658                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
31659            }
31660            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
31661            MEMORY_VECT_DATA::ID => {
31662                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
31663            }
31664            LOGGING_DATA_ACKED_DATA::ID => {
31665                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
31666            }
31667            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
31668                .map(Self::FILE_TRANSFER_PROTOCOL),
31669            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
31670                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
31671                    .map(Self::TIME_ESTIMATE_TO_TARGET)
31672            }
31673            STORAGE_INFORMATION_DATA::ID => {
31674                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
31675            }
31676            PARAM_REQUEST_READ_DATA::ID => {
31677                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
31678            }
31679            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
31680                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
31681                    .map(Self::SAFETY_SET_ALLOWED_AREA)
31682            }
31683            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
31684            PARAM_VALUE_DATA::ID => {
31685                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
31686            }
31687            ISBD_LINK_STATUS_DATA::ID => {
31688                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
31689            }
31690            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
31691                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
31692                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
31693            }
31694            V2_EXTENSION_DATA::ID => {
31695                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
31696            }
31697            HIL_RC_INPUTS_RAW_DATA::ID => {
31698                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
31699            }
31700            ATT_POS_MOCAP_DATA::ID => {
31701                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
31702            }
31703            MOUNT_ORIENTATION_DATA::ID => {
31704                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
31705            }
31706            LINK_NODE_STATUS_DATA::ID => {
31707                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
31708            }
31709            ENCAPSULATED_DATA_DATA::ID => {
31710                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
31711            }
31712            CANFD_FRAME_DATA::ID => {
31713                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
31714            }
31715            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
31716                .map(Self::OPEN_DRONE_ID_LOCATION),
31717            VIDEO_STREAM_STATUS_DATA::ID => {
31718                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
31719            }
31720            RESPONSE_EVENT_ERROR_DATA::ID => {
31721                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
31722            }
31723            HYGROMETER_SENSOR_DATA::ID => {
31724                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
31725            }
31726            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
31727            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
31728            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
31729                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
31730                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
31731            }
31732            LOG_REQUEST_DATA_DATA::ID => {
31733                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
31734            }
31735            MANUAL_CONTROL_DATA::ID => {
31736                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
31737            }
31738            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
31739            GLOBAL_POSITION_INT_COV_DATA::ID => {
31740                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
31741                    .map(Self::GLOBAL_POSITION_INT_COV)
31742            }
31743            MAG_CAL_REPORT_DATA::ID => {
31744                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
31745            }
31746            SCALED_IMU2_DATA::ID => {
31747                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
31748            }
31749            UTM_GLOBAL_POSITION_DATA::ID => {
31750                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
31751            }
31752            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
31753            SAFETY_ALLOWED_AREA_DATA::ID => {
31754                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
31755            }
31756            MISSION_REQUEST_LIST_DATA::ID => {
31757                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
31758            }
31759            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
31760                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
31761                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
31762            }
31763            ATTITUDE_QUATERNION_DATA::ID => {
31764                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
31765            }
31766            COMPONENT_METADATA_DATA::ID => {
31767                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
31768            }
31769            PARAM_REQUEST_LIST_DATA::ID => {
31770                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
31771            }
31772            HIL_CONTROLS_DATA::ID => {
31773                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
31774            }
31775            CAMERA_CAPTURE_STATUS_DATA::ID => {
31776                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
31777            }
31778            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
31779                .map(Self::PARAM_EXT_REQUEST_READ),
31780            CAMERA_TRIGGER_DATA::ID => {
31781                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
31782            }
31783            GIMBAL_MANAGER_STATUS_DATA::ID => {
31784                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
31785            }
31786            GPS_RTCM_DATA_DATA::ID => {
31787                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
31788            }
31789            ESTIMATOR_STATUS_DATA::ID => {
31790                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
31791            }
31792            PARAM_EXT_VALUE_DATA::ID => {
31793                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
31794            }
31795            PARAM_MAP_RC_DATA::ID => {
31796                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
31797            }
31798            AVAILABLE_MODES_MONITOR_DATA::ID => {
31799                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
31800                    .map(Self::AVAILABLE_MODES_MONITOR)
31801            }
31802            TERRAIN_DATA_DATA::ID => {
31803                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
31804            }
31805            MESSAGE_INTERVAL_DATA::ID => {
31806                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
31807            }
31808            COMPONENT_INFORMATION_BASIC_DATA::ID => {
31809                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
31810                    .map(Self::COMPONENT_INFORMATION_BASIC)
31811            }
31812            CAMERA_IMAGE_CAPTURED_DATA::ID => {
31813                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
31814            }
31815            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
31816            TERRAIN_CHECK_DATA::ID => {
31817                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
31818            }
31819            POWER_STATUS_DATA::ID => {
31820                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
31821            }
31822            MISSION_SET_CURRENT_DATA::ID => {
31823                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
31824            }
31825            OBSTACLE_DISTANCE_DATA::ID => {
31826                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
31827            }
31828            MISSION_REQUEST_DATA::ID => {
31829                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
31830            }
31831            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
31832                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
31833                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
31834            }
31835            MISSION_CLEAR_ALL_DATA::ID => {
31836                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
31837            }
31838            VISION_SPEED_ESTIMATE_DATA::ID => {
31839                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
31840            }
31841            MANUAL_SETPOINT_DATA::ID => {
31842                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
31843            }
31844            PARAM_EXT_SET_DATA::ID => {
31845                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
31846            }
31847            LOCAL_POSITION_NED_DATA::ID => {
31848                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
31849            }
31850            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
31851            RAW_PRESSURE_DATA::ID => {
31852                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
31853            }
31854            ACTUATOR_CONTROL_TARGET_DATA::ID => {
31855                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31856                    .map(Self::ACTUATOR_CONTROL_TARGET)
31857            }
31858            RADIO_STATUS_DATA::ID => {
31859                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
31860            }
31861            MISSION_ACK_DATA::ID => {
31862                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
31863            }
31864            SERIAL_CONTROL_DATA::ID => {
31865                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
31866            }
31867            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
31868                .map(Self::ORBIT_EXECUTION_STATUS),
31869            SERVO_OUTPUT_RAW_DATA::ID => {
31870                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
31871            }
31872            HIL_ACTUATOR_CONTROLS_DATA::ID => {
31873                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
31874            }
31875            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
31876                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
31877                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
31878            }
31879            HIGH_LATENCY2_DATA::ID => {
31880                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
31881            }
31882            DISTANCE_SENSOR_DATA::ID => {
31883                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
31884            }
31885            BUTTON_CHANGE_DATA::ID => {
31886                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
31887            }
31888            FUEL_STATUS_DATA::ID => {
31889                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
31890            }
31891            VICON_POSITION_ESTIMATE_DATA::ID => {
31892                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
31893                    .map(Self::VICON_POSITION_ESTIMATE)
31894            }
31895            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
31896                .map(Self::CURRENT_EVENT_SEQUENCE),
31897            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
31898                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
31899            }
31900            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
31901                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31902                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
31903            }
31904            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
31905            CURRENT_MODE_DATA::ID => {
31906                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
31907            }
31908            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
31909                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
31910            }
31911            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
31912            LOGGING_DATA_DATA::ID => {
31913                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
31914            }
31915            ILLUMINATOR_STATUS_DATA::ID => {
31916                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
31917            }
31918            CAMERA_THERMAL_RANGE_DATA::ID => {
31919                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
31920            }
31921            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
31922            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
31923            LOG_REQUEST_END_DATA::ID => {
31924                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
31925            }
31926            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
31927            NAV_CONTROLLER_OUTPUT_DATA::ID => {
31928                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
31929            }
31930            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
31931            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
31932                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31933                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
31934            }
31935            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
31936            WHEEL_DISTANCE_DATA::ID => {
31937                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
31938            }
31939            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
31940            SETUP_SIGNING_DATA::ID => {
31941                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
31942            }
31943            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
31944            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
31945            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
31946            HIL_STATE_QUATERNION_DATA::ID => {
31947                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
31948            }
31949            MISSION_REQUEST_INT_DATA::ID => {
31950                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
31951            }
31952            EXTENDED_SYS_STATE_DATA::ID => {
31953                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
31954            }
31955            UAVCAN_NODE_STATUS_DATA::ID => {
31956                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
31957            }
31958            TERRAIN_REQUEST_DATA::ID => {
31959                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
31960            }
31961            CAMERA_SETTINGS_DATA::ID => {
31962                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
31963            }
31964            POSITION_TARGET_LOCAL_NED_DATA::ID => {
31965                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
31966                    .map(Self::POSITION_TARGET_LOCAL_NED)
31967            }
31968            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
31969            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
31970            DEBUG_FLOAT_ARRAY_DATA::ID => {
31971                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
31972            }
31973            RESOURCE_REQUEST_DATA::ID => {
31974                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
31975            }
31976            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
31977                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
31978                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
31979            }
31980            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
31981            TERRAIN_REPORT_DATA::ID => {
31982                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
31983            }
31984            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
31985                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
31986                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
31987            }
31988            MISSION_ITEM_DATA::ID => {
31989                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
31990            }
31991            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
31992                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
31993                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
31994            }
31995            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
31996            GPS_RAW_INT_DATA::ID => {
31997                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
31998            }
31999            RC_CHANNELS_RAW_DATA::ID => {
32000                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32001            }
32002            SCALED_PRESSURE3_DATA::ID => {
32003                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32004            }
32005            ATTITUDE_TARGET_DATA::ID => {
32006                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
32007            }
32008            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
32009                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
32010                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
32011            }
32012            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
32013                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
32014                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
32015            }
32016            WIFI_CONFIG_AP_DATA::ID => {
32017                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
32018            }
32019            MISSION_CURRENT_DATA::ID => {
32020                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
32021            }
32022            REQUEST_EVENT_DATA::ID => {
32023                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
32024            }
32025            LANDING_TARGET_DATA::ID => {
32026                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
32027            }
32028            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
32029            PLAY_TUNE_V2_DATA::ID => {
32030                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
32031            }
32032            CHANGE_OPERATOR_CONTROL_DATA::ID => {
32033                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
32034                    .map(Self::CHANGE_OPERATOR_CONTROL)
32035            }
32036            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
32037                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
32038                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
32039            }
32040            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
32041                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
32042                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
32043            }
32044            RADIO_CALIBRATION_DATA::ID => {
32045                RADIO_CALIBRATION_DATA::deser(version, payload).map(Self::RADIO_CALIBRATION)
32046            }
32047            SUPPORTED_TUNES_DATA::ID => {
32048                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32049            }
32050            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
32051                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
32052                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
32053            }
32054            BATTERY_STATUS_DATA::ID => {
32055                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
32056            }
32057            SMART_BATTERY_INFO_DATA::ID => {
32058                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
32059            }
32060            CELLULAR_CONFIG_DATA::ID => {
32061                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
32062            }
32063            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
32064                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
32065                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
32066            }
32067            RC_CHANNELS_OVERRIDE_DATA::ID => {
32068                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
32069            }
32070            FENCE_STATUS_DATA::ID => {
32071                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
32072            }
32073            UAVCAN_NODE_INFO_DATA::ID => {
32074                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
32075            }
32076            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32077                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32078            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
32079                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
32080                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
32081            }
32082            COMMAND_CANCEL_DATA::ID => {
32083                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
32084            }
32085            OPTICAL_FLOW_DATA::ID => {
32086                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32087            }
32088            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
32089            LOG_REQUEST_LIST_DATA::ID => {
32090                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
32091            }
32092            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
32093            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32094                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32095                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
32096            }
32097            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
32098                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
32099                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
32100            }
32101            MISSION_ITEM_REACHED_DATA::ID => {
32102                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
32103            }
32104            DATA_STREAM_DATA::ID => {
32105                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
32106            }
32107            MISSION_COUNT_DATA::ID => {
32108                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
32109            }
32110            CONTROL_SYSTEM_STATE_DATA::ID => {
32111                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
32112            }
32113            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32114            AUTOPILOT_VERSION_DATA::ID => {
32115                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
32116            }
32117            REQUEST_DATA_STREAM_DATA::ID => {
32118                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
32119            }
32120            COMMAND_INT_DATA::ID => {
32121                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
32122            }
32123            VISION_POSITION_ESTIMATE_DATA::ID => {
32124                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32125                    .map(Self::VISION_POSITION_ESTIMATE)
32126            }
32127            SCALED_PRESSURE_DATA::ID => {
32128                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32129            }
32130            CAN_FILTER_MODIFY_DATA::ID => {
32131                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
32132            }
32133            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
32134            LOGGING_ACK_DATA::ID => {
32135                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
32136            }
32137            CAMERA_INFORMATION_DATA::ID => {
32138                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
32139            }
32140            BATTERY_INFO_DATA::ID => {
32141                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
32142            }
32143            NAV_FILTER_BIAS_DATA::ID => {
32144                NAV_FILTER_BIAS_DATA::deser(version, payload).map(Self::NAV_FILTER_BIAS)
32145            }
32146            CAMERA_FOV_STATUS_DATA::ID => {
32147                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
32148            }
32149            GLOBAL_POSITION_INT_DATA::ID => {
32150                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
32151            }
32152            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32153                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32154                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32155            }
32156            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32157            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32158                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32159                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32160            }
32161            FLIGHT_INFORMATION_DATA::ID => {
32162                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
32163            }
32164            SYSTEM_TIME_DATA::ID => {
32165                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
32166            }
32167            NAMED_VALUE_INT_DATA::ID => {
32168                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32169            }
32170            NAMED_VALUE_FLOAT_DATA::ID => {
32171                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
32172            }
32173            SCALED_IMU3_DATA::ID => {
32174                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
32175            }
32176            COMMAND_LONG_DATA::ID => {
32177                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
32178            }
32179            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
32180            UALBERTA_SYS_STATUS_DATA::ID => {
32181                UALBERTA_SYS_STATUS_DATA::deser(version, payload).map(Self::UALBERTA_SYS_STATUS)
32182            }
32183            CELLULAR_STATUS_DATA::ID => {
32184                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
32185            }
32186            HIGHRES_IMU_DATA::ID => {
32187                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
32188            }
32189            RC_CHANNELS_DATA::ID => {
32190                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32191            }
32192            PARAM_EXT_ACK_DATA::ID => {
32193                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
32194            }
32195            PROTOCOL_VERSION_DATA::ID => {
32196                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32197            }
32198            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
32199            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32200            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
32201                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
32202                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
32203            }
32204            VIDEO_STREAM_INFORMATION_DATA::ID => {
32205                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32206                    .map(Self::VIDEO_STREAM_INFORMATION)
32207            }
32208            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
32209            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
32210            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
32211                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32212                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
32213            }
32214            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
32215            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32216        }
32217    }
32218    fn message_name(&self) -> &'static str {
32219        match self {
32220            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
32221            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32222            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
32223            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
32224            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32225            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
32226            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32227            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
32228            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
32229            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32230            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
32231            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
32232            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
32233            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
32234            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
32235            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
32236            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32237            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
32238            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32239            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
32240            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
32241            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32242            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32243            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
32244            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
32245            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
32246            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
32247            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
32248            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
32249            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
32250            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32251            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
32252            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
32253            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32254            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
32255            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
32256            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
32257            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
32258            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
32259            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32260            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
32261            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
32262            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
32263            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32264            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32265            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
32266            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
32267            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
32268            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
32269            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
32270            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
32271            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
32272            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
32273            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
32274            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
32275            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
32276            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
32277            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
32278            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
32279            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32280            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
32281            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
32282            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32283            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
32284            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
32285            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
32286            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
32287            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
32288            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
32289            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32290                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
32291            }
32292            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
32293            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
32294            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32295            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32296            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
32297            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32298            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
32299            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
32300            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
32301            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32302            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
32303            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
32304            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
32305            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
32306            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32307            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
32308            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
32309            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
32310            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
32311            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
32312            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32313            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32314            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
32315            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
32316            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32317            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
32318            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32319            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
32320            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
32321            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
32322            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
32323            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32324            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
32325            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32326            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
32327            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32328            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
32329            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
32330            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32331            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
32332            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
32333            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32334            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32335            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
32336            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
32337            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
32338            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
32339            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
32340            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
32341            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32342            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32343            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
32344            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
32345            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32346            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32347            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
32348            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32349            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
32350            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
32351            Self::COLLISION(..) => COLLISION_DATA::NAME,
32352            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
32353            Self::EVENT(..) => EVENT_DATA::NAME,
32354            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
32355            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
32356            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
32357            Self::DEBUG(..) => DEBUG_DATA::NAME,
32358            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
32359            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
32360            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
32361            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
32362            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
32363            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
32364            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
32365            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32366            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
32367            Self::PING(..) => PING_DATA::NAME,
32368            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
32369            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
32370            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
32371            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
32372                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
32373            }
32374            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
32375            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
32376            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
32377            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
32378            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32379                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
32380            }
32381            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
32382            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32383            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
32384            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
32385            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32386            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
32387            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
32388            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
32389            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
32390            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
32391            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
32392            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
32393            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
32394            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
32395            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32396                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
32397            }
32398            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
32399            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::NAME,
32400            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
32401            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32402            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
32403            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
32404            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
32405            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
32406            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32407            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32408            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
32409            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32410            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
32411            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
32412            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32413            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
32414            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32415            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32416            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32417            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32418                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
32419            }
32420            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
32421            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
32422            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
32423            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32424            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
32425            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
32426            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
32427            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
32428            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
32429            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
32430            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
32431            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32432            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
32433            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
32434            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32435            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::NAME,
32436            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
32437            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32438            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32439            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
32440            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32441            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
32442            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
32443            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
32444            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
32445            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
32446            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
32447            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
32448            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::NAME,
32449            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32450            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32451            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
32452            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
32453            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32454            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32455            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
32456            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
32457            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
32458            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32459            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
32460            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
32461            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
32462        }
32463    }
32464    fn message_id(&self) -> u32 {
32465        match self {
32466            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
32467            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
32468            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
32469            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
32470            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
32471            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
32472            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
32473            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
32474            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
32475            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
32476            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
32477            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
32478            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
32479            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
32480            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
32481            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
32482            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
32483            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
32484            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
32485            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
32486            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
32487            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
32488            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
32489            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
32490            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
32491            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
32492            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
32493            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
32494            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
32495            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
32496            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
32497            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
32498            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
32499            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
32500            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
32501            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
32502            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
32503            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
32504            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
32505            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
32506            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
32507            Self::VIBRATION(..) => VIBRATION_DATA::ID,
32508            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
32509            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
32510            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
32511            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
32512            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
32513            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
32514            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
32515            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
32516            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
32517            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
32518            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
32519            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
32520            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
32521            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
32522            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
32523            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
32524            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
32525            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
32526            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
32527            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
32528            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
32529            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
32530            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
32531            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
32532            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
32533            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
32534            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
32535            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32536                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
32537            }
32538            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
32539            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
32540            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
32541            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
32542            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
32543            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
32544            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
32545            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
32546            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
32547            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
32548            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
32549            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
32550            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
32551            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
32552            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
32553            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
32554            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
32555            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
32556            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
32557            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
32558            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
32559            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
32560            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
32561            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
32562            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
32563            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
32564            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
32565            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
32566            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
32567            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
32568            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
32569            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
32570            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
32571            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
32572            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
32573            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
32574            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
32575            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
32576            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
32577            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
32578            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
32579            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
32580            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
32581            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
32582            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
32583            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
32584            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
32585            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
32586            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
32587            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
32588            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
32589            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
32590            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
32591            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
32592            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
32593            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
32594            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
32595            Self::TUNNEL(..) => TUNNEL_DATA::ID,
32596            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
32597            Self::COLLISION(..) => COLLISION_DATA::ID,
32598            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
32599            Self::EVENT(..) => EVENT_DATA::ID,
32600            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
32601            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
32602            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
32603            Self::DEBUG(..) => DEBUG_DATA::ID,
32604            Self::SET_MODE(..) => SET_MODE_DATA::ID,
32605            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
32606            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
32607            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
32608            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
32609            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
32610            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
32611            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
32612            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
32613            Self::PING(..) => PING_DATA::ID,
32614            Self::WIND_COV(..) => WIND_COV_DATA::ID,
32615            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
32616            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
32617            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
32618            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
32619            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
32620            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
32621            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
32622            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32623                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
32624            }
32625            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
32626            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
32627            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
32628            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
32629            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
32630            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
32631            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
32632            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
32633            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
32634            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
32635            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
32636            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
32637            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
32638            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
32639            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32640                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
32641            }
32642            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
32643            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::ID,
32644            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
32645            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
32646            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
32647            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
32648            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
32649            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
32650            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
32651            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
32652            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
32653            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
32654            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
32655            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
32656            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
32657            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
32658            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
32659            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
32660            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
32661            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32662                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
32663            }
32664            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
32665            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
32666            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
32667            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
32668            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
32669            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
32670            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
32671            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
32672            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
32673            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
32674            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
32675            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
32676            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
32677            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
32678            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
32679            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::ID,
32680            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
32681            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
32682            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
32683            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
32684            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
32685            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
32686            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
32687            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
32688            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
32689            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
32690            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
32691            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
32692            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::ID,
32693            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
32694            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
32695            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
32696            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
32697            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
32698            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
32699            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
32700            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
32701            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
32702            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
32703            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
32704            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
32705            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
32706        }
32707    }
32708    fn message_id_from_name(name: &str) -> Option<u32> {
32709        match name {
32710            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
32711            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
32712            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
32713            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
32714            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
32715            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
32716            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
32717            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
32718            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
32719            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
32720            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
32721            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
32722            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
32723            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
32724            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
32725            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
32726            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
32727            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
32728            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
32729            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
32730            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
32731            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
32732            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
32733            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
32734            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
32735            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
32736            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
32737            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
32738            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
32739            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
32740            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
32741            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
32742            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
32743            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
32744            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
32745            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
32746            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
32747            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
32748            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
32749            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
32750            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
32751            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
32752            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
32753            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
32754            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
32755            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
32756            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
32757            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
32758            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
32759            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
32760            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
32761            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
32762            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
32763            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
32764            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
32765            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
32766            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
32767            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
32768            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
32769            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
32770            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
32771            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
32772            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
32773            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
32774            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
32775            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
32776            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
32777            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
32778            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
32779            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
32780                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
32781            }
32782            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
32783            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
32784            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
32785            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
32786            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
32787            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
32788            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
32789            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
32790            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
32791            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
32792            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
32793            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
32794            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
32795            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
32796            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
32797            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
32798            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
32799            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
32800            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
32801            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
32802            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
32803            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
32804            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
32805            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
32806            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
32807            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
32808            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
32809            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
32810            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
32811            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
32812            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
32813            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
32814            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
32815            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
32816            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
32817            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
32818            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
32819            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
32820            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
32821            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
32822            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
32823            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
32824            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
32825            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
32826            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
32827            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
32828            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
32829            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
32830            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
32831            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
32832            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
32833            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
32834            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
32835            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
32836            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
32837            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
32838            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
32839            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
32840            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
32841            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
32842            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
32843                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
32844            }
32845            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
32846            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
32847            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
32848            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
32849            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
32850            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
32851            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
32852            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
32853            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
32854            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
32855            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
32856            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
32857            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
32858            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
32859            PING_DATA::NAME => Some(PING_DATA::ID),
32860            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
32861            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
32862            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
32863            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
32864                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
32865            }
32866            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
32867            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
32868            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
32869            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
32870            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
32871                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
32872            }
32873            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
32874            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
32875            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
32876            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
32877            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
32878            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
32879                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
32880            }
32881            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
32882            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
32883            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
32884            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
32885            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
32886            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
32887            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
32888            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
32889            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
32890                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
32891            }
32892            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
32893            RADIO_CALIBRATION_DATA::NAME => Some(RADIO_CALIBRATION_DATA::ID),
32894            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
32895            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
32896            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
32897            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
32898            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
32899            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
32900            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
32901            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
32902            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
32903            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
32904            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
32905            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
32906            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
32907            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
32908            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
32909            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
32910            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
32911                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
32912            }
32913            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
32914                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
32915            }
32916            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
32917            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
32918            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
32919            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
32920            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
32921            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
32922            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
32923            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
32924            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
32925            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
32926            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
32927            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
32928            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
32929            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
32930            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
32931            NAV_FILTER_BIAS_DATA::NAME => Some(NAV_FILTER_BIAS_DATA::ID),
32932            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
32933            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
32934            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
32935            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
32936            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
32937            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
32938            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
32939            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
32940            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
32941            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
32942            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
32943            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
32944            UALBERTA_SYS_STATUS_DATA::NAME => Some(UALBERTA_SYS_STATUS_DATA::ID),
32945            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
32946            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
32947            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
32948            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
32949            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
32950            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
32951            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
32952            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
32953            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
32954            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
32955            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
32956            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
32957                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
32958            }
32959            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
32960            _ => None,
32961        }
32962    }
32963    fn default_message_from_id(id: u32) -> Option<Self> {
32964        match id {
32965            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
32966            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
32967                LOCAL_POSITION_NED_COV_DATA::default(),
32968            )),
32969            MISSION_ITEM_INT_DATA::ID => {
32970                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
32971            }
32972            OPTICAL_FLOW_RAD_DATA::ID => {
32973                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
32974            }
32975            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
32976            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
32977            GPS_GLOBAL_ORIGIN_DATA::ID => {
32978                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
32979            }
32980            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
32981                GIMBAL_MANAGER_INFORMATION_DATA::default(),
32982            )),
32983            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
32984            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
32985                ACTUATOR_OUTPUT_STATUS_DATA::default(),
32986            )),
32987            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
32988            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
32989                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
32990            )),
32991            AVAILABLE_MODES_DATA::ID => {
32992                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
32993            }
32994            GPS_INJECT_DATA_DATA::ID => {
32995                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
32996            }
32997            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
32998            SET_HOME_POSITION_DATA::ID => {
32999                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
33000            }
33001            GENERATOR_STATUS_DATA::ID => {
33002                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33003            }
33004            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33005                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33006            )),
33007            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33008            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
33009            SCALED_PRESSURE2_DATA::ID => {
33010                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
33011            }
33012            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33013                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33014            )),
33015            HIL_OPTICAL_FLOW_DATA::ID => {
33016                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33017            }
33018            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33019                SET_ATTITUDE_TARGET_DATA::default(),
33020            )),
33021            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33022                ONBOARD_COMPUTER_STATUS_DATA::default(),
33023            )),
33024            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33025                PARAM_EXT_REQUEST_LIST_DATA::default(),
33026            )),
33027            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
33028            RC_CHANNELS_SCALED_DATA::ID => {
33029                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
33030            }
33031            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33032                ATTITUDE_QUATERNION_COV_DATA::default(),
33033            )),
33034            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33035                OPEN_DRONE_ID_SELF_ID_DATA::default(),
33036            )),
33037            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33038                COMPONENT_INFORMATION_DATA::default(),
33039            )),
33040            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33041            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33042            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33043            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
33044            LOGGING_DATA_ACKED_DATA::ID => {
33045                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
33046            }
33047            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33048                FILE_TRANSFER_PROTOCOL_DATA::default(),
33049            )),
33050            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33051                TIME_ESTIMATE_TO_TARGET_DATA::default(),
33052            )),
33053            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33054                STORAGE_INFORMATION_DATA::default(),
33055            )),
33056            PARAM_REQUEST_READ_DATA::ID => {
33057                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33058            }
33059            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33060                SAFETY_SET_ALLOWED_AREA_DATA::default(),
33061            )),
33062            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
33063            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
33064            ISBD_LINK_STATUS_DATA::ID => {
33065                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33066            }
33067            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33068                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
33069            )),
33070            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
33071            HIL_RC_INPUTS_RAW_DATA::ID => {
33072                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33073            }
33074            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33075            MOUNT_ORIENTATION_DATA::ID => {
33076                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
33077            }
33078            LINK_NODE_STATUS_DATA::ID => {
33079                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33080            }
33081            ENCAPSULATED_DATA_DATA::ID => {
33082                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33083            }
33084            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33085            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33086                OPEN_DRONE_ID_LOCATION_DATA::default(),
33087            )),
33088            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33089                VIDEO_STREAM_STATUS_DATA::default(),
33090            )),
33091            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33092                RESPONSE_EVENT_ERROR_DATA::default(),
33093            )),
33094            HYGROMETER_SENSOR_DATA::ID => {
33095                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33096            }
33097            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33098            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33099            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33100                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
33101            )),
33102            LOG_REQUEST_DATA_DATA::ID => {
33103                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
33104            }
33105            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
33106            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
33107            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33108                GLOBAL_POSITION_INT_COV_DATA::default(),
33109            )),
33110            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
33111            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
33112            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33113                UTM_GLOBAL_POSITION_DATA::default(),
33114            )),
33115            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
33116            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33117                SAFETY_ALLOWED_AREA_DATA::default(),
33118            )),
33119            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33120                MISSION_REQUEST_LIST_DATA::default(),
33121            )),
33122            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33123                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33124                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33125                ))
33126            }
33127            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33128                ATTITUDE_QUATERNION_DATA::default(),
33129            )),
33130            COMPONENT_METADATA_DATA::ID => {
33131                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33132            }
33133            PARAM_REQUEST_LIST_DATA::ID => {
33134                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33135            }
33136            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33137            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33138                CAMERA_CAPTURE_STATUS_DATA::default(),
33139            )),
33140            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33141                PARAM_EXT_REQUEST_READ_DATA::default(),
33142            )),
33143            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33144            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33145                GIMBAL_MANAGER_STATUS_DATA::default(),
33146            )),
33147            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33148            ESTIMATOR_STATUS_DATA::ID => {
33149                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33150            }
33151            PARAM_EXT_VALUE_DATA::ID => {
33152                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
33153            }
33154            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
33155            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33156                AVAILABLE_MODES_MONITOR_DATA::default(),
33157            )),
33158            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
33159            MESSAGE_INTERVAL_DATA::ID => {
33160                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33161            }
33162            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33163                COMPONENT_INFORMATION_BASIC_DATA::default(),
33164            )),
33165            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33166                CAMERA_IMAGE_CAPTURED_DATA::default(),
33167            )),
33168            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33169            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
33170            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
33171            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33172                MISSION_SET_CURRENT_DATA::default(),
33173            )),
33174            OBSTACLE_DISTANCE_DATA::ID => {
33175                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
33176            }
33177            MISSION_REQUEST_DATA::ID => {
33178                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
33179            }
33180            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33181                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
33182            )),
33183            MISSION_CLEAR_ALL_DATA::ID => {
33184                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33185            }
33186            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33187                VISION_SPEED_ESTIMATE_DATA::default(),
33188            )),
33189            MANUAL_SETPOINT_DATA::ID => {
33190                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33191            }
33192            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
33193            LOCAL_POSITION_NED_DATA::ID => {
33194                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33195            }
33196            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33197            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
33198            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33199                ACTUATOR_CONTROL_TARGET_DATA::default(),
33200            )),
33201            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
33202            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33203            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
33204            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33205                ORBIT_EXECUTION_STATUS_DATA::default(),
33206            )),
33207            SERVO_OUTPUT_RAW_DATA::ID => {
33208                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
33209            }
33210            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33211                HIL_ACTUATOR_CONTROLS_DATA::default(),
33212            )),
33213            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33214                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33215            )),
33216            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33217            DISTANCE_SENSOR_DATA::ID => {
33218                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33219            }
33220            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33221            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33222            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33223                VICON_POSITION_ESTIMATE_DATA::default(),
33224            )),
33225            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33226                CURRENT_EVENT_SEQUENCE_DATA::default(),
33227            )),
33228            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33229                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
33230            )),
33231            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33232                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
33233            )),
33234            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33235            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33236            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33237                OPEN_DRONE_ID_SYSTEM_DATA::default(),
33238            )),
33239            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33240            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
33241            ILLUMINATOR_STATUS_DATA::ID => {
33242                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33243            }
33244            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33245                CAMERA_THERMAL_RANGE_DATA::default(),
33246            )),
33247            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33248            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
33249            LOG_REQUEST_END_DATA::ID => {
33250                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33251            }
33252            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
33253            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33254                NAV_CONTROLLER_OUTPUT_DATA::default(),
33255            )),
33256            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33257            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33258                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33259                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33260                ))
33261            }
33262            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33263            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
33264            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
33265            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
33266            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33267            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
33268            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33269            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33270                HIL_STATE_QUATERNION_DATA::default(),
33271            )),
33272            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33273                MISSION_REQUEST_INT_DATA::default(),
33274            )),
33275            EXTENDED_SYS_STATE_DATA::ID => {
33276                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33277            }
33278            UAVCAN_NODE_STATUS_DATA::ID => {
33279                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
33280            }
33281            TERRAIN_REQUEST_DATA::ID => {
33282                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
33283            }
33284            CAMERA_SETTINGS_DATA::ID => {
33285                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33286            }
33287            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33288                POSITION_TARGET_LOCAL_NED_DATA::default(),
33289            )),
33290            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
33291            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
33292            DEBUG_FLOAT_ARRAY_DATA::ID => {
33293                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33294            }
33295            RESOURCE_REQUEST_DATA::ID => {
33296                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33297            }
33298            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33299                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33300                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
33301                ))
33302            }
33303            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
33304            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
33305            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33306                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
33307            )),
33308            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
33309            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33310                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33311                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
33312                ))
33313            }
33314            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33315            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33316            RC_CHANNELS_RAW_DATA::ID => {
33317                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
33318            }
33319            SCALED_PRESSURE3_DATA::ID => {
33320                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
33321            }
33322            ATTITUDE_TARGET_DATA::ID => {
33323                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33324            }
33325            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33326                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33327            )),
33328            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33329                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33330            )),
33331            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
33332            MISSION_CURRENT_DATA::ID => {
33333                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
33334            }
33335            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
33336            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33337            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33338            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
33339            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33340                CHANGE_OPERATOR_CONTROL_DATA::default(),
33341            )),
33342            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33343                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33344                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33345                ))
33346            }
33347            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33348                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33349            )),
33350            RADIO_CALIBRATION_DATA::ID => {
33351                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::default()))
33352            }
33353            SUPPORTED_TUNES_DATA::ID => {
33354                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
33355            }
33356            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33357                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
33358            )),
33359            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33360            SMART_BATTERY_INFO_DATA::ID => {
33361                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
33362            }
33363            CELLULAR_CONFIG_DATA::ID => {
33364                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33365            }
33366            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33367                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33368            )),
33369            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33370                RC_CHANNELS_OVERRIDE_DATA::default(),
33371            )),
33372            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33373            UAVCAN_NODE_INFO_DATA::ID => {
33374                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
33375            }
33376            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33377                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
33378            )),
33379            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33380                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33381            )),
33382            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33383            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33384            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33385            LOG_REQUEST_LIST_DATA::ID => {
33386                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
33387            }
33388            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
33389            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33390                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
33391            )),
33392            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33393                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33394                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
33395                ))
33396            }
33397            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33398                MISSION_ITEM_REACHED_DATA::default(),
33399            )),
33400            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33401            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
33402            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33403                CONTROL_SYSTEM_STATE_DATA::default(),
33404            )),
33405            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
33406            AUTOPILOT_VERSION_DATA::ID => {
33407                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33408            }
33409            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33410                REQUEST_DATA_STREAM_DATA::default(),
33411            )),
33412            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33413            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33414                VISION_POSITION_ESTIMATE_DATA::default(),
33415            )),
33416            SCALED_PRESSURE_DATA::ID => {
33417                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
33418            }
33419            CAN_FILTER_MODIFY_DATA::ID => {
33420                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33421            }
33422            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33423            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
33424            CAMERA_INFORMATION_DATA::ID => {
33425                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33426            }
33427            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33428            NAV_FILTER_BIAS_DATA::ID => {
33429                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::default()))
33430            }
33431            CAMERA_FOV_STATUS_DATA::ID => {
33432                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33433            }
33434            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33435                GLOBAL_POSITION_INT_DATA::default(),
33436            )),
33437            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33438                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33439            )),
33440            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
33441            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33442                POSITION_TARGET_GLOBAL_INT_DATA::default(),
33443            )),
33444            FLIGHT_INFORMATION_DATA::ID => {
33445                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33446            }
33447            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
33448            NAMED_VALUE_INT_DATA::ID => {
33449                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
33450            }
33451            NAMED_VALUE_FLOAT_DATA::ID => {
33452                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
33453            }
33454            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33455            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33456            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33457            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
33458                UALBERTA_SYS_STATUS_DATA::default(),
33459            )),
33460            CELLULAR_STATUS_DATA::ID => {
33461                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33462            }
33463            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33464            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
33465            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
33466            PROTOCOL_VERSION_DATA::ID => {
33467                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33468            }
33469            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33470            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
33471            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33472                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33473            )),
33474            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33475                VIDEO_STREAM_INFORMATION_DATA::default(),
33476            )),
33477            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
33478            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33479            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33480                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
33481            )),
33482            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33483            _ => None,
33484        }
33485    }
33486    #[cfg(feature = "arbitrary")]
33487    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
33488        match id {
33489            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
33490            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33491                LOCAL_POSITION_NED_COV_DATA::random(rng),
33492            )),
33493            MISSION_ITEM_INT_DATA::ID => {
33494                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
33495            }
33496            OPTICAL_FLOW_RAD_DATA::ID => {
33497                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
33498            }
33499            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
33500            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
33501            GPS_GLOBAL_ORIGIN_DATA::ID => {
33502                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
33503            }
33504            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33505                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
33506            )),
33507            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
33508            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33509                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
33510            )),
33511            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
33512            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33513                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
33514            )),
33515            AVAILABLE_MODES_DATA::ID => {
33516                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
33517            }
33518            GPS_INJECT_DATA_DATA::ID => {
33519                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
33520            }
33521            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
33522            SET_HOME_POSITION_DATA::ID => {
33523                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
33524            }
33525            GENERATOR_STATUS_DATA::ID => {
33526                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
33527            }
33528            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33529                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
33530            )),
33531            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
33532            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
33533            SCALED_PRESSURE2_DATA::ID => {
33534                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
33535            }
33536            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33537                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
33538            )),
33539            HIL_OPTICAL_FLOW_DATA::ID => {
33540                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
33541            }
33542            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33543                SET_ATTITUDE_TARGET_DATA::random(rng),
33544            )),
33545            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33546                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
33547            )),
33548            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33549                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
33550            )),
33551            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
33552            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
33553                RC_CHANNELS_SCALED_DATA::random(rng),
33554            )),
33555            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33556                ATTITUDE_QUATERNION_COV_DATA::random(rng),
33557            )),
33558            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33559                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
33560            )),
33561            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33562                COMPONENT_INFORMATION_DATA::random(rng),
33563            )),
33564            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
33565            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
33566            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
33567            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
33568            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
33569                LOGGING_DATA_ACKED_DATA::random(rng),
33570            )),
33571            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33572                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
33573            )),
33574            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33575                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
33576            )),
33577            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33578                STORAGE_INFORMATION_DATA::random(rng),
33579            )),
33580            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
33581                PARAM_REQUEST_READ_DATA::random(rng),
33582            )),
33583            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33584                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
33585            )),
33586            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
33587            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
33588            ISBD_LINK_STATUS_DATA::ID => {
33589                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
33590            }
33591            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33592                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
33593            )),
33594            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
33595            HIL_RC_INPUTS_RAW_DATA::ID => {
33596                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
33597            }
33598            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
33599            MOUNT_ORIENTATION_DATA::ID => {
33600                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
33601            }
33602            LINK_NODE_STATUS_DATA::ID => {
33603                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
33604            }
33605            ENCAPSULATED_DATA_DATA::ID => {
33606                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
33607            }
33608            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
33609            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33610                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
33611            )),
33612            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33613                VIDEO_STREAM_STATUS_DATA::random(rng),
33614            )),
33615            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33616                RESPONSE_EVENT_ERROR_DATA::random(rng),
33617            )),
33618            HYGROMETER_SENSOR_DATA::ID => {
33619                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
33620            }
33621            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
33622            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
33623            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33624                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
33625            )),
33626            LOG_REQUEST_DATA_DATA::ID => {
33627                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
33628            }
33629            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
33630            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
33631            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33632                GLOBAL_POSITION_INT_COV_DATA::random(rng),
33633            )),
33634            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
33635            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
33636            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33637                UTM_GLOBAL_POSITION_DATA::random(rng),
33638            )),
33639            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
33640            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33641                SAFETY_ALLOWED_AREA_DATA::random(rng),
33642            )),
33643            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33644                MISSION_REQUEST_LIST_DATA::random(rng),
33645            )),
33646            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33647                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33648                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
33649                ))
33650            }
33651            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33652                ATTITUDE_QUATERNION_DATA::random(rng),
33653            )),
33654            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
33655                COMPONENT_METADATA_DATA::random(rng),
33656            )),
33657            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
33658                PARAM_REQUEST_LIST_DATA::random(rng),
33659            )),
33660            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
33661            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33662                CAMERA_CAPTURE_STATUS_DATA::random(rng),
33663            )),
33664            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33665                PARAM_EXT_REQUEST_READ_DATA::random(rng),
33666            )),
33667            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
33668            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33669                GIMBAL_MANAGER_STATUS_DATA::random(rng),
33670            )),
33671            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
33672            ESTIMATOR_STATUS_DATA::ID => {
33673                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
33674            }
33675            PARAM_EXT_VALUE_DATA::ID => {
33676                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
33677            }
33678            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
33679            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33680                AVAILABLE_MODES_MONITOR_DATA::random(rng),
33681            )),
33682            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
33683            MESSAGE_INTERVAL_DATA::ID => {
33684                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
33685            }
33686            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33687                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
33688            )),
33689            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33690                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
33691            )),
33692            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
33693            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
33694            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
33695            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33696                MISSION_SET_CURRENT_DATA::random(rng),
33697            )),
33698            OBSTACLE_DISTANCE_DATA::ID => {
33699                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
33700            }
33701            MISSION_REQUEST_DATA::ID => {
33702                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
33703            }
33704            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33705                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
33706            )),
33707            MISSION_CLEAR_ALL_DATA::ID => {
33708                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
33709            }
33710            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33711                VISION_SPEED_ESTIMATE_DATA::random(rng),
33712            )),
33713            MANUAL_SETPOINT_DATA::ID => {
33714                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
33715            }
33716            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
33717            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
33718                LOCAL_POSITION_NED_DATA::random(rng),
33719            )),
33720            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
33721            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
33722            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33723                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33724            )),
33725            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
33726            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
33727            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
33728            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33729                ORBIT_EXECUTION_STATUS_DATA::random(rng),
33730            )),
33731            SERVO_OUTPUT_RAW_DATA::ID => {
33732                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
33733            }
33734            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33735                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
33736            )),
33737            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33738                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
33739            )),
33740            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
33741            DISTANCE_SENSOR_DATA::ID => {
33742                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
33743            }
33744            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
33745            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
33746            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33747                VICON_POSITION_ESTIMATE_DATA::random(rng),
33748            )),
33749            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33750                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
33751            )),
33752            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33753                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
33754            )),
33755            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33756                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33757            )),
33758            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
33759            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
33760            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33761                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
33762            )),
33763            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
33764            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
33765            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
33766                ILLUMINATOR_STATUS_DATA::random(rng),
33767            )),
33768            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33769                CAMERA_THERMAL_RANGE_DATA::random(rng),
33770            )),
33771            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
33772            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
33773            LOG_REQUEST_END_DATA::ID => {
33774                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
33775            }
33776            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
33777            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33778                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
33779            )),
33780            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
33781            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33782                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33783                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
33784                ))
33785            }
33786            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
33787            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
33788            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
33789            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
33790            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
33791            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
33792            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
33793            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33794                HIL_STATE_QUATERNION_DATA::random(rng),
33795            )),
33796            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33797                MISSION_REQUEST_INT_DATA::random(rng),
33798            )),
33799            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
33800                EXTENDED_SYS_STATE_DATA::random(rng),
33801            )),
33802            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
33803                UAVCAN_NODE_STATUS_DATA::random(rng),
33804            )),
33805            TERRAIN_REQUEST_DATA::ID => {
33806                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
33807            }
33808            CAMERA_SETTINGS_DATA::ID => {
33809                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
33810            }
33811            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33812                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33813            )),
33814            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
33815            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
33816            DEBUG_FLOAT_ARRAY_DATA::ID => {
33817                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
33818            }
33819            RESOURCE_REQUEST_DATA::ID => {
33820                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
33821            }
33822            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33823                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33824                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
33825                ))
33826            }
33827            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
33828            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
33829            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33830                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
33831            )),
33832            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
33833            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33834                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33835                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
33836                ))
33837            }
33838            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
33839            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
33840            RC_CHANNELS_RAW_DATA::ID => {
33841                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
33842            }
33843            SCALED_PRESSURE3_DATA::ID => {
33844                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
33845            }
33846            ATTITUDE_TARGET_DATA::ID => {
33847                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
33848            }
33849            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33850                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
33851            )),
33852            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33853                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
33854            )),
33855            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
33856            MISSION_CURRENT_DATA::ID => {
33857                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
33858            }
33859            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
33860            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
33861            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
33862            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
33863            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33864                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
33865            )),
33866            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33867                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33868                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
33869                ))
33870            }
33871            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33872                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
33873            )),
33874            RADIO_CALIBRATION_DATA::ID => {
33875                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::random(rng)))
33876            }
33877            SUPPORTED_TUNES_DATA::ID => {
33878                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
33879            }
33880            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33881                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
33882            )),
33883            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
33884            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
33885                SMART_BATTERY_INFO_DATA::random(rng),
33886            )),
33887            CELLULAR_CONFIG_DATA::ID => {
33888                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
33889            }
33890            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33891                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
33892            )),
33893            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33894                RC_CHANNELS_OVERRIDE_DATA::random(rng),
33895            )),
33896            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
33897            UAVCAN_NODE_INFO_DATA::ID => {
33898                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
33899            }
33900            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33901                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
33902            )),
33903            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33904                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
33905            )),
33906            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
33907            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
33908            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
33909            LOG_REQUEST_LIST_DATA::ID => {
33910                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
33911            }
33912            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
33913            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33914                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33915            )),
33916            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33917                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33918                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
33919                ))
33920            }
33921            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33922                MISSION_ITEM_REACHED_DATA::random(rng),
33923            )),
33924            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
33925            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
33926            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33927                CONTROL_SYSTEM_STATE_DATA::random(rng),
33928            )),
33929            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
33930            AUTOPILOT_VERSION_DATA::ID => {
33931                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
33932            }
33933            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33934                REQUEST_DATA_STREAM_DATA::random(rng),
33935            )),
33936            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
33937            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33938                VISION_POSITION_ESTIMATE_DATA::random(rng),
33939            )),
33940            SCALED_PRESSURE_DATA::ID => {
33941                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
33942            }
33943            CAN_FILTER_MODIFY_DATA::ID => {
33944                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
33945            }
33946            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
33947            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
33948            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
33949                CAMERA_INFORMATION_DATA::random(rng),
33950            )),
33951            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
33952            NAV_FILTER_BIAS_DATA::ID => {
33953                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::random(rng)))
33954            }
33955            CAMERA_FOV_STATUS_DATA::ID => {
33956                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
33957            }
33958            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33959                GLOBAL_POSITION_INT_DATA::random(rng),
33960            )),
33961            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33962                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
33963            )),
33964            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
33965            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33966                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33967            )),
33968            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
33969                FLIGHT_INFORMATION_DATA::random(rng),
33970            )),
33971            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
33972            NAMED_VALUE_INT_DATA::ID => {
33973                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
33974            }
33975            NAMED_VALUE_FLOAT_DATA::ID => {
33976                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
33977            }
33978            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
33979            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
33980            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
33981            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
33982                UALBERTA_SYS_STATUS_DATA::random(rng),
33983            )),
33984            CELLULAR_STATUS_DATA::ID => {
33985                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
33986            }
33987            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
33988            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
33989            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
33990            PROTOCOL_VERSION_DATA::ID => {
33991                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
33992            }
33993            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
33994            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
33995            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33996                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
33997            )),
33998            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33999                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34000            )),
34001            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
34002            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
34003            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34004                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34005            )),
34006            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
34007            _ => None,
34008        }
34009    }
34010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34011        match self {
34012            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34013            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34014            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34015            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
34016            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34017            Self::SCALED_IMU(body) => body.ser(version, bytes),
34018            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34019            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34020            Self::VFR_HUD(body) => body.ser(version, bytes),
34021            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34022            Self::HOME_POSITION(body) => body.ser(version, bytes),
34023            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34024            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34025            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34026            Self::ATTITUDE(body) => body.ser(version, bytes),
34027            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
34028            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34029            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34030            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34031            Self::PLAY_TUNE(body) => body.ser(version, bytes),
34032            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
34033            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34034            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34035            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
34036            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34037            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
34038            Self::WINCH_STATUS(body) => body.ser(version, bytes),
34039            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
34040            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34041            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
34042            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34043            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34044            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34045            Self::EFI_STATUS(body) => body.ser(version, bytes),
34046            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34047            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34048            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34049            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
34050            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
34051            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
34052            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
34053            Self::VIBRATION(body) => body.ser(version, bytes),
34054            Self::PARAM_VALUE(body) => body.ser(version, bytes),
34055            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34056            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
34057            Self::V2_EXTENSION(body) => body.ser(version, bytes),
34058            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34059            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34060            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34061            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34062            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34063            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34064            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34065            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
34066            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
34067            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34068            Self::CAN_FRAME(body) => body.ser(version, bytes),
34069            Self::GPS_RTK(body) => body.ser(version, bytes),
34070            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34071            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34072            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34073            Self::SYS_STATUS(body) => body.ser(version, bytes),
34074            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34075            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34076            Self::SCALED_IMU2(body) => body.ser(version, bytes),
34077            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
34078            Self::SIM_STATE(body) => body.ser(version, bytes),
34079            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
34080            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34081            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34082            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34083            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34084            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
34085            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34086            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34087            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
34088            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34089            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34090            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34091            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34092            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
34093            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
34094            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34095            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
34096            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34097            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34098            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34099            Self::GPS_STATUS(body) => body.ser(version, bytes),
34100            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
34101            Self::POWER_STATUS(body) => body.ser(version, bytes),
34102            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34103            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34104            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34105            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34106            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34107            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
34108            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34109            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
34110            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34111            Self::HIL_STATE(body) => body.ser(version, bytes),
34112            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
34113            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34114            Self::RADIO_STATUS(body) => body.ser(version, bytes),
34115            Self::MISSION_ACK(body) => body.ser(version, bytes),
34116            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
34117            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
34118            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
34119            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34120            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34121            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34122            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34123            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34124            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34125            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34126            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34127            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34128            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34129            Self::ESC_STATUS(body) => body.ser(version, bytes),
34130            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34131            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
34132            Self::AUTH_KEY(body) => body.ser(version, bytes),
34133            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34134            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34135            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34136            Self::ESC_INFO(body) => body.ser(version, bytes),
34137            Self::RAW_RPM(body) => body.ser(version, bytes),
34138            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34139            Self::TUNNEL(body) => body.ser(version, bytes),
34140            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34141            Self::COLLISION(body) => body.ser(version, bytes),
34142            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34143            Self::EVENT(body) => body.ser(version, bytes),
34144            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
34145            Self::LOG_ERASE(body) => body.ser(version, bytes),
34146            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
34147            Self::DEBUG(body) => body.ser(version, bytes),
34148            Self::SET_MODE(body) => body.ser(version, bytes),
34149            Self::HEARTBEAT(body) => body.ser(version, bytes),
34150            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34151            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34152            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34153            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
34154            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
34155            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34156            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34157            Self::PING(body) => body.ser(version, bytes),
34158            Self::WIND_COV(body) => body.ser(version, bytes),
34159            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34160            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
34161            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
34162            Self::TIMESYNC(body) => body.ser(version, bytes),
34163            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
34164            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34165            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34166            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
34167            Self::GPS_INPUT(body) => body.ser(version, bytes),
34168            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34169            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
34170            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
34171            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34172            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34173            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34174            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
34175            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34176            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
34177            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34178            Self::GPS2_RAW(body) => body.ser(version, bytes),
34179            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
34180            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34181            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34182            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34183            Self::RADIO_CALIBRATION(body) => body.ser(version, bytes),
34184            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
34185            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
34186            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34187            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
34188            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34189            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34190            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
34191            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34192            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
34193            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34194            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34195            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34196            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
34197            Self::ALTITUDE(body) => body.ser(version, bytes),
34198            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34199            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34200            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34201            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34202            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34203            Self::DATA_STREAM(body) => body.ser(version, bytes),
34204            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34205            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34206            Self::STATUSTEXT(body) => body.ser(version, bytes),
34207            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34208            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
34209            Self::COMMAND_INT(body) => body.ser(version, bytes),
34210            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34211            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
34212            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34213            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34214            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34215            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34216            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34217            Self::NAV_FILTER_BIAS(body) => body.ser(version, bytes),
34218            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34219            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34220            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34221            Self::RAW_IMU(body) => body.ser(version, bytes),
34222            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34223            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34224            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
34225            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34226            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34227            Self::SCALED_IMU3(body) => body.ser(version, bytes),
34228            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34229            Self::HIL_GPS(body) => body.ser(version, bytes),
34230            Self::UALBERTA_SYS_STATUS(body) => body.ser(version, bytes),
34231            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34232            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34233            Self::RC_CHANNELS(body) => body.ser(version, bytes),
34234            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
34235            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
34236            Self::PARAM_SET(body) => body.ser(version, bytes),
34237            Self::ODOMETRY(body) => body.ser(version, bytes),
34238            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34239            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34240            Self::LOG_DATA(body) => body.ser(version, bytes),
34241            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34242            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34243            Self::GPS2_RTK(body) => body.ser(version, bytes),
34244        }
34245    }
34246    fn extra_crc(id: u32) -> u8 {
34247        match id {
34248            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
34249            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34250            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
34251            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
34252            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
34253            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
34254            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34255            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
34256            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
34257            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
34258            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
34259            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
34260            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
34261            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
34262            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
34263            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
34264            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34265            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
34266            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34267            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
34268            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
34269            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34270            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34271            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
34272            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
34273            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
34274            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
34275            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
34276            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
34277            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
34278            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34279            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
34280            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
34281            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34282            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
34283            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
34284            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
34285            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
34286            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
34287            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
34288            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
34289            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
34290            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
34291            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34292            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
34293            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
34294            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
34295            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
34296            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
34297            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34298            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
34299            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
34300            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
34301            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
34302            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
34303            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
34304            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
34305            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
34306            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
34307            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34308            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
34309            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
34310            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34311            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
34312            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
34313            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
34314            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
34315            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
34316            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
34317            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34318                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
34319            }
34320            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
34321            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
34322            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
34323            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34324            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
34325            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
34326            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
34327            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
34328            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
34329            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34330            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
34331            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
34332            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
34333            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
34334            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34335            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
34336            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
34337            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
34338            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
34339            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
34340            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
34341            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
34342            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
34343            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
34344            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34345            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
34346            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34347            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
34348            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
34349            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
34350            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
34351            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34352            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
34353            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34354            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
34355            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
34356            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
34357            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
34358            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34359            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
34360            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
34361            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34362            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34363            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34364            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
34365            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34366            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34367            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
34368            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
34369            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
34370            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34371            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
34372            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
34373            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34374            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34375            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
34376            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34377            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
34378            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
34379            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
34380            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34381                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
34382            }
34383            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
34384            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
34385            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
34386            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
34387            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
34388            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
34389            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
34390            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
34391            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
34392            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
34393            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
34394            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
34395            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34396            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34397            PING_DATA::ID => PING_DATA::EXTRA_CRC,
34398            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
34399            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
34400            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
34401            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34402                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
34403            }
34404            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
34405            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
34406            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
34407            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
34408            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34409                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
34410            }
34411            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
34412            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34413            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
34414            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
34415            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34416            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
34417            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
34418            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
34419            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
34420            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
34421            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
34422            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
34423            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
34424            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
34425            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34426                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
34427            }
34428            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
34429            RADIO_CALIBRATION_DATA::ID => RADIO_CALIBRATION_DATA::EXTRA_CRC,
34430            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
34431            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
34432            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
34433            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
34434            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
34435            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
34436            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
34437            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34438            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
34439            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
34440            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
34441            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
34442            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
34443            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
34444            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34445            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34446            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34447                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
34448            }
34449            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34450                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
34451            }
34452            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
34453            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
34454            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
34455            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34456            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
34457            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
34458            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
34459            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
34460            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34461            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
34462            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
34463            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34464            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
34465            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
34466            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34467            NAV_FILTER_BIAS_DATA::ID => NAV_FILTER_BIAS_DATA::EXTRA_CRC,
34468            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
34469            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34470            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
34471            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
34472            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
34473            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
34474            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
34475            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
34476            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
34477            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
34478            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
34479            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
34480            UALBERTA_SYS_STATUS_DATA::ID => UALBERTA_SYS_STATUS_DATA::EXTRA_CRC,
34481            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34482            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34483            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
34484            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
34485            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
34486            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
34487            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
34488            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
34489            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
34490            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34491            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
34492            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34493            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
34494            _ => 0,
34495        }
34496    }
34497    fn target_system_id(&self) -> Option<u8> {
34498        match self {
34499            Self::COMMAND_ACK(inner) => Some(inner.target_system),
34500            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
34501            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
34502            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
34503            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
34504            Self::PLAY_TUNE(inner) => Some(inner.target_system),
34505            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
34506            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
34507            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
34508            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
34509            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
34510            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
34511            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
34512            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
34513            Self::V2_EXTENSION(inner) => Some(inner.target_system),
34514            Self::CANFD_FRAME(inner) => Some(inner.target_system),
34515            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
34516            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
34517            Self::CAN_FRAME(inner) => Some(inner.target_system),
34518            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
34519            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
34520            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
34521            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
34522            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
34523            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
34524            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
34525            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
34526            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
34527            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
34528            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
34529            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
34530            Self::MISSION_ACK(inner) => Some(inner.target_system),
34531            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
34532            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
34533            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
34534            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
34535            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
34536            Self::LOGGING_DATA(inner) => Some(inner.target_system),
34537            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
34538            Self::TUNNEL(inner) => Some(inner.target_system),
34539            Self::LOG_ERASE(inner) => Some(inner.target_system),
34540            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
34541            Self::SET_MODE(inner) => Some(inner.target_system),
34542            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
34543            Self::PING(inner) => Some(inner.target_system),
34544            Self::TIMESYNC(inner) => Some(inner.target_system),
34545            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
34546            Self::MISSION_ITEM(inner) => Some(inner.target_system),
34547            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
34548            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
34549            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
34550            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
34551            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
34552            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
34553            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
34554            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
34555            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
34556            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
34557            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
34558            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
34559            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
34560            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
34561            Self::MISSION_COUNT(inner) => Some(inner.target_system),
34562            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
34563            Self::COMMAND_INT(inner) => Some(inner.target_system),
34564            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
34565            Self::LOGGING_ACK(inner) => Some(inner.target_system),
34566            Self::COMMAND_LONG(inner) => Some(inner.target_system),
34567            Self::PARAM_SET(inner) => Some(inner.target_system),
34568            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
34569            _ => None,
34570        }
34571    }
34572    fn target_component_id(&self) -> Option<u8> {
34573        match self {
34574            Self::COMMAND_ACK(inner) => Some(inner.target_component),
34575            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
34576            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
34577            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
34578            Self::PLAY_TUNE(inner) => Some(inner.target_component),
34579            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
34580            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
34581            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
34582            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
34583            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
34584            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
34585            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
34586            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
34587            Self::V2_EXTENSION(inner) => Some(inner.target_component),
34588            Self::CANFD_FRAME(inner) => Some(inner.target_component),
34589            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
34590            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
34591            Self::CAN_FRAME(inner) => Some(inner.target_component),
34592            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
34593            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
34594            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
34595            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
34596            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
34597            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
34598            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
34599            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
34600            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
34601            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
34602            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
34603            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
34604            Self::MISSION_ACK(inner) => Some(inner.target_component),
34605            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
34606            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
34607            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
34608            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
34609            Self::LOGGING_DATA(inner) => Some(inner.target_component),
34610            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
34611            Self::TUNNEL(inner) => Some(inner.target_component),
34612            Self::LOG_ERASE(inner) => Some(inner.target_component),
34613            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
34614            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
34615            Self::PING(inner) => Some(inner.target_component),
34616            Self::TIMESYNC(inner) => Some(inner.target_component),
34617            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
34618            Self::MISSION_ITEM(inner) => Some(inner.target_component),
34619            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
34620            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
34621            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
34622            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
34623            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
34624            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
34625            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
34626            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
34627            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
34628            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
34629            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
34630            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
34631            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
34632            Self::MISSION_COUNT(inner) => Some(inner.target_component),
34633            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
34634            Self::COMMAND_INT(inner) => Some(inner.target_component),
34635            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
34636            Self::LOGGING_ACK(inner) => Some(inner.target_component),
34637            Self::COMMAND_LONG(inner) => Some(inner.target_component),
34638            Self::PARAM_SET(inner) => Some(inner.target_component),
34639            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
34640            _ => None,
34641        }
34642    }
34643}